asp.net - I cannot create a C# if statement -
hi trying write if statement checking of conditions within via or's , cannot work receiving error:
operator '||' cannot applied operands of type bool' , lambda expression
have no thought why getting error have created if statements before , used or logical operator ||
have ideas. it's stupid. have changed bracketing multiple times seek , working don't think it, latest attempt:
if((name.indexof("fail") >= 0) || (seatingpreference == "fail") || (mealpreference == "fail") || (mydob => datetime.today) || (myexpirydate <= datetime.today) || (myissuedate > datetime.today)) { sendemail = false; error = true; }
i hope can help nooby problem! informing don't have much experience in c# if didn't guess
you mistyped.
just right (mydob => datetime.today)
(mydob >= datetime.today)
c# asp.net if-statement logical-operators
No comments:
Post a Comment