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
What is immutable in C#?
Which of the following operations can you not perform on an ado.net dataset?
From a versioning perspective, what are the drawbacks of extending an interface as opposed to extending a class?
Is c# and c sharp same?
What do constructors do in c#?
Why is xml called extensible?
Define xslt.
Give an example of a ctype.
Explain use of abstract and sealed classes in c#?
What is difference between internal and protected internal in c#?
Differentiate between the public and private ?
What Happens In Memory When You Box And Unbox A Value-type?
What is a class c#?
What is the difference between constant and readonly in c#?
What's difference between constants and static readonly?