CSharp examples for Language Basics:if
Use if statement to check command line parameter count
using System;//from w ww . j a v a2 s .c o m using static System.Console; using System.IO; class Program { static void Main(string[] args) { if (args.Length == 0) { WriteLine("There are no arguments."); } else { WriteLine("There is at least one argument."); } } }