Quote Originally Posted by jmcilhinney View Post
You're saying that it's not valid if it's not equal to * or it's not equal to - or it's not equal to * or it's not equal to /. If the user enters one of those four operators then one of your conditions will be true but the other three will be false, so the whole expression will be false. You should be using logical AND operators, not logical OR operators. Only if all four conditions is true is the value invalid.

By the way, it's very rare that you should be using the logical | and & operators. You should almost exclusively use the || and && operators because they short-circuit. You should only use the single versions when you specifically don't want to short-circuit, but such code would generally be considered poor in C# anyway.
Thanks your Awesome!!!