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.5 The if statement

An if statement selects a statement for execution based on the value of a boolean expression. An if statement may optionally include an else clause that executes if the boolean expression is false.

The example

using System;
class Test
{
   static void Main(string[] args) {
      if (args.Length == 0)
         Console.WriteLine("No arguments were provided");
      else
         Console.WriteLine("Arguments were provided");
   }
}

shows a program that uses an if statement to write out two different messages depending on whether command-line arguments were provided or not.