what are different types of interfaces in c sharp?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • syedriazcse
    New Member
    • Jul 2013
    • 1

    what are different types of interfaces in c sharp?

    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.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    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

    Comment

    • Sherin
      New Member
      • Jan 2020
      • 77

      #3
      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

      Working...