Answer Posted / kiran
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 |
Post New Answer View All Answers
Name some string escape sequences in c#.
How Reflection is used and what it's significance ?
What is xpath in c#?
What is bit in c#?
What is the process of Serialization?
Can multiple inheritance implemented in c# ?
Can I do things in il that I can't do in c#?
Explain types of comment in c# with examples
Is multilevel inheritance possible in c#?
What is Implementation inheritance
Which controls do not have events?
What is mvc in c#?
What is array collection?
What method is used to sort the elements of the array in descending order?
What is xaml file in c#?