what is the real use of interface in c#,other than that
multiple inheritance is not possible
Answer Posted / pugal
When creating a standalone project which can be
changed at will, use an interface in preference to an
abstract class; because, it offers more design flexibility.
Use an interface to design a polymorphic hierarchy
for value types.
Use an interface when an immutable contract is
really intended.
A well-designed interface defines a very specific
range of functionality. Split up interfaces that contain
unrelated functionality.
| Is This Answer Correct ? | 48 Yes | 14 No |
Post New Answer View All Answers
Why are mutable structs evil?
In object oriented programming, how would you describe encapsulation in c#?
What problem does Delegate Solve?
What are data types examples?
What does void mean in c#?
Can scriptable objects have methods?
What are sorted lists?
what is IDisposal interface,IComparable,IEquatable,IFormatable
What is the use of getcommandlineargs() method in c#.net?
Define an escape sequence, name few strings in escape sequence?
How does it work?
Can int be null c#?
How do I stop my console from closing in c#?
Is javascript harder than c#?
What is an int c#?