public static int Main(string[] args) { // check args if(args.Length != 1) { Console.WriteLine("USAGE: ThreadStartDouble <double>" + "|min|max|pi|nan|negi|posi\n"); return -1; } double d = 0D; // check for special cases switch(args[0].ToLower()) { case "max": d = Double.MaxValue; break; case "min": d = Double.MinValue; break; case "pi": d = Math.PI; break; case "nan": d = Double.NaN; break; case "negi": d = Double.NegativeInfinity; break; case "posi": d = Double.PositiveInfinity; break; default: d = Convert.ToDouble(args[0]); break; } ThreadStartDouble tsd = new ThreadStartDouble(); return tsd.Run(d); }