public static int Main(string[] args) { // check args if (args.Length != 1) { Console.WriteLine("USAGE: ThreadStartShort <short>|min|max\n"); return(-1); } short s = 0; // check for max or min if (args[0].ToLower() == "max") { s = Int16.MaxValue; } else if (args[0].ToLower() == "min") { s = Int16.MinValue; } else { s = Convert.ToInt16(args[0]); } ThreadStartShort tss = new ThreadStartShort(); return(tss.Run(s)); }
public static int Main(string[] args) { // check args if(args.Length != 1) { Console.WriteLine("USAGE: ThreadStartShort <short>|min|max\n"); return -1; } short s = 0; // check for max or min if(args[0].ToLower() == "max") s = Int16.MaxValue; else if(args[0].ToLower() == "min") s = Int16.MinValue; else s = Convert.ToInt16(args[0]); ThreadStartShort tss = new ThreadStartShort(); return tss.Run(s); }