Playing with C # the last few days and trying to use my βshortβ syntax, I tried to use the following trick.
Int32 _LastIndex = -1; T[] _Array; _Array[_LastIndex++] = obj;
Now the problem is that it returns the value before the number increases, so I tried ...
_Array[(_LastIndex++)] = obj;
And yet the same behavior happens (which also confused me a bit).
Can someone first explain why the second example (I understand why the first) does not work? And is there a way to accomplish what I'm trying to do?
source share