What is an Indexer?
Most C# programmers first use an indexer when working with an array. An array is used to store a number of similar, related variables under the same name, with each variable accessed using an index number provided in square brackets. For example:
thirdItem = items;
Often it is useful to incorporate the square bracket notation for new classes. This may be because the class is used to store related information in a similar manner to an array, or simply because the index number can be useful in a calculation or lookup. Adding an indexer to … Click here to continue reading.