1. textBox只能输入数字 private void textBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar >= 31 && (e.KeyChar < <