I’m reading from a byte array as follows:
int* i = (int*)p;
id = *i;
i++;
correct me if I’m wrong, but ++ has precedence over *, so is possible to combine the *i and i++ in the same statement? (e.g. *i++)
(this is technically unsafe C#, not C++, p is a byte*)
I believe that
and
are equivalent.
The
++operator, when used as a suffix (e.g.i++), returns the value of the variable prior to the increment.I’m somewhat confused by the reflector output for
which comes out as
and
which clearly are not equivalent.