Now that C# supports ref return values, is there some way (or alternative) to use List<T>
where T
is a value type and get ref from the indexer? From the documentation it seems that it returns simply T
, which means that there is no way to update a structure in place without copying it out of the list, updating, and copying back in.
Is there any way to use List<T>
while getting a ref indexer, or some alternative data structure that does the same? I'm aware that it is possible to do this with arrays, but I'm looking for a dynamic growable array.