----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: shailaja Message 4 in Discussion Hi, I hope u mean to say diffrence between interface and abstract class. Coz we can not diffrentiate inheritance and abstract class. We can use abstract class with the help of inheritance. If you are interested in knowing diffrence between interface and abstract class here it is. If you anticipate creating multiple versions of your component, create an abstract class. Abstract classes provide a simple and easy way to version your components. By updating the base class, all inheriting classes are automatically updated with the change. Interfaces, on the other hand, cannot be changed once created. If a new version of an interface is required, you must create a whole new interface. If the functionality you are creating will be useful across a wide range of disparate objects, use an interface. Abstract classes should be used primarily for objects that are closely related, whereas interfaces are best suited for providing common functionality to unrelated classes. If you are designing small, concise bits of functionality, use interfaces. If you are designing large functional units, use an abstract class. If you want to provide common, implemented functionality among all implementations of your component, use an abstract class. Abstract classes allow you to partially implement your class, whereas interfaces contain no implementation for any members. This is generic diffrence. In case of dot net specifically if u want to compare (don't know abt other .net Languages what is exact diffrence) 1.Interface can not contain any members as well as access specifiers. By default everything is public in interface but abstract class can have member variables as well as access specifiers for member variables as well as methods 2.Interface can not contain implementation of any methods whereas abstract class can contain implementation for methods. Regards Shailaja ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/BDOTNET/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
