I'm new to programming, so I apologise if this is really basic. I just can't understand the logic of how this expression is evaluated. I know the difference between AND and OR. I'm also aware of short circuiting and precedence. Here is the expression I'm struggling with.
bool a = false
bool b = true
bool c = true
If (a && b || c)
{
Console.WriteLine("True");
}
This evaluates to true. But I would assume that once it's checked a, it would short circuit because the precedence of && isn't true in its entirety.
Can someone please explain why this is valid?