没办法,只有写个IsNum的方法
try{
int FileNumbers=int.Parse(FileNumber.Text.ToString()); 
return true;}
catch
{
return false;
}