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 the difference between system.string and system.text.stringbuilder classes?
What is the difference between function and method in c#?
What is the difference between func and action delegate?
Describe the types of comments in c#?
What is a private class in c#?
How to add a readonly property in c#.net
Can we create instance of private class in c#?
Why do I get a "cs5001: does not have an entry point defined" error when compiling?
What is use of console?
What are the types of comment in c# with examples?
What is an assembly in .net?
What is the correct way of declaring an xml namespace?
What are nested classes in c#?
List the fundamental oop concepts?
What is lazy keyword in c#?