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
Explain different properties of object oriented systems.
What is the predicate of a sentence?
Why do we need reflection in c#?
Why abstract class can not be instantiated?
What is the difference between dynamic and var in c#?
Can abstract class be sealed in c#?
What is the use of oops in c#?
What is unmannaged code and will CLR handle this kind of code or not .
What is the example of predicate?
Is and as keyword in c# net?
Explain attributes in c#?
What is deadlock in c#?
Can abstract class have constructor in c#?
How many bytes is a char c#?
Give examples for reference types?