我已经用字符串值完成了这个,比如 65.34, 65,45, 34.45
一切都返回 True ...
public void test()
{
string value = "65" 0r "65.0" 0r "1,234.54";
decimal number;
if (Decimal.TryParse(value, out number))
MessageBox.Show(value);
else
MessageBox.Show("Unable to parse '{0}'.", value);
}
这一切都返回它的十进制..
If I type "0.65" .. I need to show error and it i type "65" it has to be exectued.