Exclusive Clothing Sale On Soft & Soothe

Get up to 63% off on our latest collection.

Shop Now

Part 10 - Interface and Abstract class in C# | Oops Tutorials in C# | Oops Concept

 •1. An abstract class can have abstract members as well non abstract members. But in an interface all the members are implicitly abstract and all the members of the interface must override to its derived class.

•2. It is not mandatory to override abstract method in the derived class. But in case of Interface it’s mandatory. •3. A class can inherit one or more interfaces, but only one abstract class. •4. Abstract classes can add more functionality without destroying the child. But In case of an interface, creation of additional functions will have an effect on its child classes, due to the necessary implementation of interface methods to classes. •5. Abstract class members can have access modifiers where as interface members cannot have access modifiers. • •The selection of interface or abstract class depends on the need and design of your project. You can make an abstract class, interface or combination of both depending on your needs.





Share this

Related Posts

Previous
Next Post »

Exclusive Clothing Sale On Soft & Soothe

Get up to 63% off on our latest collection.

Shop Now