c# textboxaccept only numbers

77

c# textboxaccept only numbers -

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

Comments

Submit
0 Comments