What is Interface? Explain with an example.

Answer Posted / mohit bhandari

An interface is a named set of method signatures.Interfaces
can also define events and properties because all of these
are just syntax shorthands that map to methods anyway.
In C#, interface keyword is used to define an interface,
giving it a name and its set of instance method signatures.
e.g.
public interface IDisposable {
void Dispose();
}

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the and operator in c#?

495


What is ac callback?

507


What is the difference between interface and abstract class in c#?

465


What are managed providers?

549


What do you mean by winforms in c#?

509






What are collections in c#?

475


What is value c#?

464


Why do we need static class in c#?

576


What does dbml mean?

507


What is list collection in c#?

529


What is meant by unicode characters?

571


Is clr a compiler?

495


What do u meant by "SBI" of an object?

540


What is typeof c#?

522


What is the resgen.exe tool used for?

530