I was asked this question in an interview, i thought he was asking various types of implementing interfaces in csharp, but he was expecting some other answer. I searched the web but could not find out, can come body answer this question.
what are different types of interfaces in c sharp?
Collapse
X
-
Tags: None
-
Maybe the interviewer was expecting an answer along the lines of:- Hardware Interface: for example I/O devices, storage devices, buses etc.
- Software Interfaces: application/program interfacing, object interfacing
- Scope: indicates what can be interfaced with
It would be best to ask the interviewer what answer he was expecting because the question is rather vague.
-Frinny -
Interfaces define properties, methods, and events, which are the members of the interface.Inter faces contain only the declaration of the members.
Some of the interface types in C# include.
IEnumerable − Base interface for all generic collections.
IList − A generic interface implemented by the arrays and the list type.
IDictionary − A dictionary collection.
IEnumerable is an interface defining a single method GetEnumerator that returns an IEnumerator interface.
This works for readonly access to a collection that implements that IEnumerable can be used with a foreach statement.Comment
Comment