C# 检查数字

        #region 检查数字
public bool IsNumeric(string value)
{
bool result;
try
{
int x = int.Parse(value);
result = true;
}
catch
{
result = false;
} try
{
double x = double.Parse(value);
result = true;
}
catch
{
result = false;
} try
{
float x = float.Parse(value);
result = true;
}
catch
{
result = false;
} return result;
}
#endregion
上一篇:ABP Changing Httpcode status


下一篇:verilog阻塞与非阻塞的初步理解(三)