📜  仅窗口窗体文本框数字 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:47.231000             🧑  作者: Mango

代码示例2
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
    {
        e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
    }