A stupid question in if block
Posted
by
priyanka.sarkar_2
on Stack Overflow
See other posts from Stack Overflow
or by priyanka.sarkar_2
Published on 2011-01-06T14:50:59Z
Indexed on
2011/01/06
14:53 UTC
Read the original article
Hit count: 147
c#-3.0
I have a very stupid issue
if (updateYN.ToUpper() != Constants.NO || updateYN.ToUpper() != Constants.N) { // execute code for any other updateYN }
I am trying to perform a filteration that if the value of updateYN is not NO(Constants.NO) or N(Constants.N), then execute the statement.
But the problem is that , irresptive of the values , the if block is executing.
What wrong is there
Thanks
© Stack Overflow or respective owner