标签:blog ar div on log line as tt har
public static int? TrayParse(string text) { int ret; if (int.TryParse(text,out ret)) { return ret; } else { return null; } } static void Main(string []argd){ int? parsed = TrayParse("Not Valid"); if (parsed.HasValue) { Console.WriteLine("Parsed to {0}",parsed.Value); } else { Console.WriteLine("Couldn‘t parse"); } }
标签:blog ar div on log line as tt har
原文地址:http://www.cnblogs.com/alphafly/p/4044089.html