You can use
KeyPress event of
TextBox control:
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
char[] charsNotAllowed = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
if (charsNotAllowed.Contains(e.KeyChar))
{
e.Handled = true;
}
}
Hope it helps you :)