-
Dec 21st, 2010, 01:04 AM
#1
Thread Starter
Fanatic Member
Recommendations for Abstract class vs interfaces
Hi,
From the following URL i got some doubts about the Recommendations for using Abstract class vs interfaces
http://msdn.microsoft.com/en-us/libr...(v=vs.71).aspx
1. 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. { Is there any example for this t ounderstand throughly ?}
Can any one explain with example please 2. 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. { Is there any example for this t ounderstand throughly ?}
Can any one explain with example please
-
Dec 21st, 2010, 03:16 AM
#2
Re: Recommendations for Abstract class vs interfaces
-
Dec 21st, 2010, 06:10 AM
#3
Thread Starter
Fanatic Member
Re: Recommendations for Abstract class vs interfaces
-
Dec 21st, 2010, 06:54 AM
#4
Re: Recommendations for Abstract class vs interfaces
No worries.
Let me know if you have any more questions.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|