How do I overload the [] operator in C# [duplicate]
This question already has answers here: How do I overload the square-bracket operator in C#? (8 answers) Closed 8 years ago. I would like to add an operator to a class. I currently have a GetValue() method that I would like to replace with an [] operator. class A { private List<int> values = new … Read more