14 May 2014 by balajidileepkumar
private void textBox1_KeyPress(object sender, KeyPressEventArgs e){e.Handled = ((new Char[] {'0','1','2','3','4','5','6','7','8','9'}).ToList()).Contains(e.KeyChar)?false:true;//you can either change it to e.Handled = char.IsDigit(e.KeyChar) ? false : true;}