NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

1.7.6 The switch statement

A switch statement executes the statements that are associated with the value of a given expression, or a default of statements if no match exists.

The example

using System;
class Test
{
   static void Main(string[] args) {
      switch (args.Length) {
         case 0:
            Console.WriteLine("No arguments were provided");
            break;
         case 1:
            Console.WriteLine("One arguments was provided");
            break;
         default:
            Console.WriteLine("{0} arguments were provided");
            break;
      }
   }
}

switches on the number of arguments provided.