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
who is a protected class-level variable available to?
What is alias in c#?
What is the difference between field and property in c#?
Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?
Does main have to be static c#?
Explain the role of the datareader class in ado.net connections?
What is gac? What are the steps to create an assembly and add it to the gac?
Distinguish between array and arraylist in c#?
What is the advantage of constructor in c#?
What is meaning of type safety in c#?
What is xamarin used for?
What all details the assembly manifest will contain?
What is a service layer c#?
What is the purpose of ienumerable in c#?
What are the types of comments in c#?