I've been reading programming books for quite a while now, and I agree this is totally useless even for explaining the syntax of the if statement. For goodness sake couldn't they write something like this at least:
for(int i = 0; i < 2; i++)
{
if(i==0)
Console.WriteLine("This is a zero");
if(i==1)
Console.WriteLine("This is a one");
}
So you could kind of understand that the code supposed to do something. In this case write something to the screen. And if you wrote this into your visual studio it would actually work!!!