#region 判断字符串是否为数字
private bool JudgeFigure(string str)
{
if(str.Trim().Length<=0)
return true;
int dot=0;
if(str[0]=='.'||str[str.Length-1]=='.')
return false;
for(int i=0;i<str.Length;i++)
{
if(dot>1) return false;
if(Char.IsDigit(str,i))
{
continue;
}
if(str[i]=='.')
{
dot=dot+1;
continue;
}
return false;
}
return true;
}
#endregion
private bool JudgeFigure(string str)
{
if(str.Trim().Length<=0)
return true;
int dot=0;
if(str[0]=='.'||str[str.Length-1]=='.')
return false;
for(int i=0;i<str.Length;i++)
{
if(dot>1) return false;
if(Char.IsDigit(str,i))
{
continue;
}
if(str[i]=='.')
{
dot=dot+1;
continue;
}
return false;
}
return true;
}
#endregion