判断字符串是否是数字的函数

 感觉这样的执行效率应该高一点

private bool IsNum(String str)
        
{
            
for(int i=0;i<str.Length;i++)
            
{
                
if(str[i]>47&&str[i]<58)
                
{
                    
return true;
                }
        
            }

            
return false;
        }

posted on 2005-11-18 02:05  生活需要勇气+毅力  阅读(900)  评论(4)    收藏  举报

导航