限制文本框仅允许浮点型数据 private void txt_Double_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if (e.KeyChar == '\b')