如何允许数字和小数点?

问题描述:

if (!int.TryParse(ds.Tables[s].Rows[i][Columncountvalue + 10].ToString().Trim(), out parsedValue))
 {
//statement
}







我使用上面的代码来限制数据表列中的输入字母。现在我想允许数据表中的小数点和数字(100,102.25)

怎么做。



我尝试过:



如何做小数点和数字只允许。




I have used above code for restrict enter letters in data table columns.now i want to allow decimal points and numbers in data table (100, 102.25)
How to do it.

What I have tried:

how to do decimal points and numbers only allowed.

所以...不要将它解析为整数,将其解析为double,float或小数......
So...don't parse it as an integer, parse it as a double, float, or decimal...