To increment an int "i", I can use any of the following:
i++;
i = i + 1;
i = i++;
...with the same result, as this code shows:
int finalVal = 0;
for (int i = 0; i < 42; i++)
{
//i++;
//i = i + 1;
i = i++;
finalVal = i;
}
MessageBox.Show(finalVal.ToString()); // in each case I get "41"
Is there any reason to prefer one style of incrementing an int over the other, or is it a case of "six of one, a half dozen of the other, and 6.0 of the yet other"?