122 Contributors: 3 Sunday, August 7, 2016
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial:
Roadmap: roadmap
Download eBook


Download c# eBook


  • public ReturnType this[IndexType index] { get { ... } set { ... }}


Indexer allows array-like syntax to access a property of an object with an index.

  • Can be used on a class, struct or interface.
  • Can be overloaded.
  • Can use multiple parameters.
  • Can be used to access and set values.
  • Can use any type for it's index.

Related Examples