[求助]看了你会惊讶
如何才能够在主函数中调用这段代码:public static bool IsNum(String str)
{
for(int i=0;i<str.Length;i++)
{
if(!Char.IsNumber(str,i))
return false;
}
return true;
}
主要有bool关键字的存在,小生不知如何调用,望各位大虾不吝赐教,在此感激不尽。
2005-04-02 16:43
2005-04-02 17:15
2005-04-02 20:25
using System; class My { static void Main() { IsNum("xun"); System.Threading .Thread .Sleep (10000); } public static bool IsNum(String str) { for(int i=0; i<str.Length ;i++) { if(!char.IsNumber (str,i)) { Console.Write ("This method is used!!"); return false; } } return true; }
}



2005-04-06 16:07

2005-04-07 22:17
2005-04-08 11:05
2005-10-03 15:00

2005-10-03 18:49

2005-10-04 13:58
2005-10-05 23:52