.Net first compiles to an intermediate language (IL).
The follogin .Net C# code
private void Form1_Load(object sender, EventArgs e)
{
int i = 0;
i++;
int j = 0;
++j;
}
Compiles to IL code, viewed in a disassembler:
ldc.i4.0 //ldc = load constant on evaluation stack
stloc.0 //Store on top of the evaluation stack
ldloc.0 //Load a local variable
ldc.i4.1 //ldc = load constant on evaluation stack
add //add
stloc.0 //Store on local evaluation stack
ldc.i4.0 //Load contant 0 on the evaluation stack
stloc.1 //Store this on variable location 1
ldloc.1 //Load variable location 1
ldc.i4.1 //Load constant 1 on evaluation stack
add //Add
stloc.1 //Store on evaluation stack
You can see that it does not matter in this case. It both compiles the same way.
First load the value on the stack, store in the variable. then load value 1 on the stack, then add and save it in the variable.
I am not sure how this will finally compile to CPU instructions.