Hi Friends ,
Why should we use abstract class ? All the features of abstract class we can achieve by the classes and interface.
The override function can be done by the interfaces and classes.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Prabhu RajaPosted Sep 14, 2011, 1:38 PM
---------------------------------------------------------------------------------------
Satyapriya NayakPosted Sep 14, 2011, 10:23 AM
Abstract classes are useful when creating components because they allow you specify an invariant level of functionality in some methods, but leave the implementation of other methods until a specific implementation of that class is needed. They also version well, because if additional functionality is needed in derived classes, it can be added to the base class without breaking code.
Thanks
VulpesPosted Sep 14, 2011, 10:22 AM
1. It can contain non-abstract instance methods and properties.
2. It can contain static methods and properties.
3. It can contain instance and static fields.
4. It can contain constants, operators and nested classes or structs.
5. Members don't necessarily have to be public, they can be internal, protected or private as well.
Of course, the drawback of abstract classes is that you can only inherit from one of them, whereas you can implement multiple interfaces as well as inherit from a single non-abstract class.