70-536 exam: do while loop
18 March 2010
The do while loop is part of the C# Language Specification, and so is somehow a deeper part of C# than the core and system library dll files (mscorlib.dll & system.dll)
using System;
namespace ConsoleApplication1
{
class Program
{
public static void Main()
{
int x = 0;
do { Console.WriteLine(x); x++; }
while (x < 5);
}
}
}
The sample code above will output a list of numbers in a command console:
0 1 2 3 4
If you liked this blog post, you may want to subscribe to my news feed in your RSS reader.
