我有这段代码,它仅在所有文本框都包含值时才有效。但是如果文本框为空,我会收到错误消息。
Int32 Total = Int32.Parse((txtChild1.Text))
+ Int32.Parse(txtChild2.Text)
+ Int32.Parse(txtChild3.Text)
+ Int32.Parse(txtWife1.Text)
+ Int32.Parse(txtWife2.Text)
+ Int32.Parse(txtWife3.Text);
我知道它必须是像 IsNull 这样的函数,但对于整数值。有谁知道它是什么?