question about interface
C#
2
Posts
2
Posters
0
Views
1
Watching
-
hi guys: can everyone tell me, what is interface, why do we use interface and when do we use interface? thanks
A quick Google[^] would reveal the answer. Ok the page is in VB but it demonstrates the concept, basically an interface is a contract. When you implement an interface you are basically signing an agreement that you will implement all the fields, properties and methods defined in the interface. You can then rather than dealing with definite objects you can deal with the common interface without having to know what the underlying type is. It's commonly used in plug in[^] based systems.