Hi all, hope you are well.
I'm trying to make my code as efficient as possible, and currently regarding logic I have a question.
Is there a way, in the following single "if" query, to determine which of the conditions are true?
if (mystring.Contains("left") || mystring.Contains("right"))
{
//which is it without another "if"?
}
I'm fairly sure there is not, but hoping there is?
Perhaps some ternary wizardry I'm unaware of?
Anyway, thank you for taking the time to read.