what is the purpose of interface in c#.net
Answers were Sorted based on User's Feedback
Answer / ankit singh
The main purpose of the interface is implement multiple
inheritance in .net
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / vai bhav
Basicalluy interface is used in any oops supported langusge
like c#.net to overcome the problem of multiple inheritance
i.e. inheriting more than one classes which have same
function also.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / n/a
The main purpose of the interface is to decsribe related
functionality that can belong to any class.
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / mayur teli
Basic purpose is to use the defined structure/pattern of common implementation on the child location.
In other word we can say that when multiple people are working on same project if they need to use some common functionality (like initializing variables for their module) instead of writing their own method name(like init(), initialize(), setup()) if we write single method name (lets say init) then this method name can be implemented by any developer who derived....
and use to achieve multiple inheritance.
Is This Answer Correct ? | 2 Yes | 2 No |
What are the different types of comments in c#?
What is a nullreferenceexception and how do I fix it?
How can you sort the elements of the array in descending order?
What are the types of serialization?
What are the different states of a thread?
What is the difference between ienumerable and enumerator?
What is difference between dynamic and var in c#?
What is the use of generics in c#?
Why do we use delegates?
What is wcf c#?
How many aware interfaces are there?
Why is main static in c#?