This code:
private bool ValToEnterIsValid(string ACandidateVal) {
return ((ACandidateVal == "1") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum1.Text)) ||
((ACandidateVal == "2") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum2.Text)) ||
((ACandidateVal == "3") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum3.Text));
}
…as well as this code:
private bool ValToEnterIsValid(string ACandidateVal) {
return (((ACandidateVal == "1") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum1.Text)) ||
((ACandidateVal == "2") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum2.Text)) ||
((ACandidateVal == "3") && (!String.IsNullOrWhiteSpace(textBoxPhoneNum3.Text)));
}
…causes VS to say, “) expected” – no matter how many right parens I add, trying to humor it!
Your parentheses on each line are unbalanced. Also, you have extraneous parens because of the way precedence works; I’d write it as
Also, is there a reason you’re using three variables instead of an array?