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 |
What is the difference between constants and read-only?
What is a lambda expression in c#?
What is the difference between proc. Sent by val and by sub?
What is the compiler of c#?
In the page load event I assigned dropdownlist’s datasource property to a valid list. On the submit button click.. The same datasource property is coming as null. Why?
Can abstract classes be final?
What are variables in c#?
What is session management in c#?
What is Covariance and contravariance in C#?
What is lazy class in c#?
What is type safe code?
What is the components of window?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)