这段代码:
private bool ValToEnterIsValid(string ACandidateVal) {
return ((ACandidateVal == "1") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum1.Text)) ||
((ACandidateVal == "2") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum2.Text)) ||
((ACandidateVal == "3") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum3.Text));
}
...以及此代码:
private bool ValToEnterIsValid(string ACandidateVal) {
return (((ACandidateVal == "1") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum1.Text)) ||
((ACandidateVal == "2") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum2.Text)) ||
((ACandidateVal == "3") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum3.Text)));
}
...导致 VS 说,“)预期” - 无论我添加多少正确的括号,试图幽默它!