I would like to do something like this:
Class.Property = something;
[] is the indexer for some List<> in Class.
This won't work, because this doesn't seem to return a reference to the object whose property I would like to modify.
In C++, would have been able to do something like this easily by overloading the [] operator, and making it return a reference.
How could I do the same in C#?
Class.Property = something;
[] is the indexer for some List<> in Class.
This won't work, because this doesn't seem to return a reference to the object whose property I would like to modify.
In C++, would have been able to do something like this easily by overloading the [] operator, and making it return a reference.
How could I do the same in C#?