2018 | OriginalPaper | Chapter
16. Indexers
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
Abstract
this
keyword is used instead of a name and their accessors take parameters. In the following example, the indexer corresponds to an object array called data
, so the type of the indexer is set to object
.
class MyArray
{
object[] data = new object[10];
public object this[int i]
{
get { return data[i]; }
set { data[i] = value; }
}
}