C# Questions and Answers

What are indexers in C# .NET?

Indexers are known as smart arrays in C#. It allows the instances of a class to be indexed in the same way as array.

Eg:

public int this[int index]    // Indexer declaration