【发布时间】:2014-10-22 15:27:58
【问题描述】:
这是我当前的代码,它只接受数字,我应该添加什么以允许小数点后一位?
private void txtPurchasePrice_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsNumber(e.KeyChar))
{
e.Handled = true;
}
【问题讨论】:
-
what should I add to allow one decimal point使用 NumericUpDown