$ 0 0 private bool IsAccept() { try { Decimal.Parse(txt1.Text); return true; <---这里要加一句 } catch { MessageBox.Show("必须为数字!"); return false; }}李鑫 2013-05-20 08:54 发表评论