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
How many variables do you need?
What is anonymous method in c#?
What is assembly manifest?
What is boxing & unboxing?
Can interface inherit class in c#?
What is sorted list in c#?
What are the fundamental differences between value types and reference types?
What is the difference between dataset and datatable in c#?
Is c# still popular?
What is a void c#?
Differentiate between copy and default constructor.
Explain the role of Garbage collector and its generations?
What is the difference between Singleton design pattern and Factory design pattern?
What are the different types of constructors in c#?
How can you sort strings in array that are passed to method as arguments?