{ char ch = e.KeyChar; if (!Char.IsDigit(ch) && ch != 8) { e.Handled = true; } }