Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace MyNamespace
- {
- class Program
- {
- static void Main(string[] args)
- {
- // The first is check condition then operations
- while (true) // boolean expression
- {
- break;
- }
- // The first is to do operations and then check condition
- do
- {
- break;
- } while (true); // boolean expression
- int a = 3;
- switch (a)
- {
- case 1: System.Console.WriteLine("CASE #1"); break;
- case 2: System.Console.WriteLine("CASE #2"); break;
- case 3:
- System.Console.WriteLine("CASE #3");
- System.Console.WriteLine("CASE #4");
- break;
- default: System.Console.WriteLine("DEFAULT"); break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement