The type of an indexer and the type of its parameters must be at least as accessible as the indexer itself. For more information about accessibility levels, see Access Modifiers.
For more information about how to use indexers with an interface, see Interface Indexers.
The signature of an indexer consists of the number and types of its formal parameters. It does not include the indexer type or the names of the formal parameters. If you declare more than one indexer in the same class, they must have different signatures.
An indexer value is not classified as a variable; therefore, you cannot pass an indexer value as a ref or out parameter.
To provide the indexer with a name that other languages can use, use a name attribute in the declaration. For example:
[System.Runtime.CompilerServices.IndexerName("TheItem")]
public int this [int index] // Indexer declaration
{
}
This indexer will have the name TheItem. Not providing the name attribute would make Item the default name.