In some C# code, I am evaluating some logic as I am moving code from PowerShell to C#, and ran across these differences.
var a = false && false || true; // answer is true
var a = true || false && false; // answer is true
However in PowerShell, the same logic:
$false -and $false -or $true # result is true
$true -or $false -and $false # result is false
The second line really seems wrong to me in c#. Is there an explanation for it, and then how can it be explained that PowerShell's logic is different?