Will the code compile?
int i = 5; while (i) { Console.WriteLine("i is now {0}", i); i++; }
No. C# does not support this.
Will the code compile?
int i = 5; while () { Console.WriteLine("i is now {0}", i); i++; }
No. C# does not support this.
Will the code compile?
int i = 5; int j=0; while (true&&true) { Console.WriteLine("i is now {0}", i); i++; }
Yes, but it will also fall into an infinite loop.