Y go for Interface? What is use of interface?
Answers were Sorted based on User's Feedback
Answer / purushotham .tella
An Interface is a collection of semantically related
abstract members.Used To Support Multiple Inheritance
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / venkat2050
interfaces is in concept of late binding which happen at
runtime which a part in OOPs concept
the interface has indexes of abstact
it should in public
Is This Answer Correct ? | 4 Yes | 2 No |
We will go for an interface when we want to implement a
specific behaviour.
ex:
1.My class x implements IDisposable interface to handle
cleaup operation. I have to implement that behaviour by
implementing the method interface method Dispose()
explicitly in my code.
class x:IDisposable
{}
2.My class y implements IComparable interface to implement
sorting between a list of objects created of type y. Here I
have to implement CompareTo method.
Is This Answer Correct ? | 3 Yes | 1 No |
How do you create user defined data types in c#?
What are custom exceptions in C#?
What is class method c#?
What are accessors?
How can you overload a method?
How do you create multiple inheritance in C#?
What are concrete classes?
What is the difference between Static, Const and read only?
Can you see a loop recorder?
What?s a satellite assembly?
what are some characteristics of an array?
What does the keyword virtual mean in the method definition?
3 Answers Ipog Software, Satyam, Visual Soft,