C# Increment operator (++) question

Well, this is a nice one. We all familiar with incremental operators, but from what i saw yesterday… well, there is no need to give a developer some tricky assignment so he could find a way to make some bugs.
3bj4h786fc

What will be the output of the next code ?

static void Main(string[] args)
{
int i = 100;
for (int n = 0; n < 100; n++)
{
i = i++;
}
Console.WriteLine(i);
}



[ Read the rest of the story in the original article... ]

Related Articles:

(This is an automated generated content. If you are the owner of this article and don't want to show this here, just write me at post@12n3.net and I'll remove it immediatly)

Login