C# Indexer in an interface

interface with indexer

An interface can specify an indexer. An indexer declared in an interface has this general form:


// interface indexer//w ww . j av a2  s.co  m
element-type this[int index] {
   get;
   set;
}

Next chapter...

What you will learn in the next chapter:

  1. How to add properties to an interface
  2. Example for Interface Properties
Home »
  C# Tutorial »
    C# Types »
      C# Interface
C# Interfaces
C# interface implementation
C# Explicit interface
C# Interface inheritance
C# Indexer in an interface
C# Interface Properties
C# struct and interface
C# virtual interface