Friday, November 14, 2008

Difference btw an interface and an abstarct class

To tell the truth i new that if we implement an interface or an abstract class we have to implement all the methods in our derived class. although in an abstract class we only have to implement only the abstract methods in an interface we have to implement all the methods that it contains.

But the funny thing is i have been confused about field implementation in interfaces. I Sort of forgotten with time that we cannot implement fields in an interface with time. Recently i read a book about VS 2008 and i was going through this book regarding interfaces i found this again. I was glad about reading that chapter s most of the time when i read a book i don't read the things i think i know. Guess it's time to change that habit also.

So bottom line is interface cannot implement any methods and well as fields.
But an abstract class can.

No comments:

Post a Comment

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...