摘要:
在siko的帖子:c#初学者,望指教 中,他提到了一个问题, string s = Console.ReadLine(); int a = int.Parse(s);对于上述代码,怎么很方便的检测输入的为Int型,而且性能不能影响很大.我在评论中给出的一个方案就是,使用Try catchint x; while(true){ try{ x = Int32.Parse(..); break; }... 阅读全文
posted @ 2004-06-14 22:25 hbiftsaa 阅读(2804) 评论(21) 推荐(0) 编辑