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 can I create a process that is running a supplied native executable (e.g., Cmd.exe)?
What is datacontract in c#?
What are the types of serialization?
What exactly happens when we debug and build the program?
Are private class-level variables inherited?
What do you use c# for?
Is goto statement supported in c#?
What is difference between ienumerable and list?
what is webapplication? what is windows application? what is the extension for both . in what purpose we r using webapplication. in which situation we r using windowns application
What is append in c#?
What's the implicit name of the parameter that gets passed into the set method/property of a class?
How to throw an caught exception from cath block?
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)