C
chenying
Unregistered / Unconfirmed
GUEST, unregistred user!
我判断输入内容是数字,想在/**1处弹出一个消息框,就想 JS的window.alert("Welcome! Press OK to continue.");,请问用C#应该怎么样写?
public static bool isNUM(string Str)
{
bool blResult = true;
if(Str == "")
blResult = false;
/**1
else
{
foreach (char Char in Str)
{
if(!char.IsNumber(Char))
{
blResult = false;
break;
}
}
if (blResult)
{
if (int.Parse(Str) == 0)
blResult = false;
}
}
return blResult;
}
public static bool isNUM(string Str)
{
bool blResult = true;
if(Str == "")
blResult = false;
/**1
else
{
foreach (char Char in Str)
{
if(!char.IsNumber(Char))
{
blResult = false;
break;
}
}
if (blResult)
{
if (int.Parse(Str) == 0)
blResult = false;
}
}
return blResult;
}