*Insert This Code In Windows App. Text box Key Press Event*

private void textBox4_KeyPress(object sender, KeyPressEventArgs e)
{
if (char.IsDigit(e.KeyChar))
{
}
else if (e.KeyChar == '\b')
{
}
else
{
e.Handled = true;
}
}