Indexer
suggest changeSyntax
- public ReturnType this[IndexType index] { get { … } set { … }}
Remarks
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.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents