Tuesday 15 July 2014

c# - How is this if statement interpreted? -


I saw the code below, which surprised everyone.

How is this code executed?

  if (! Test.IsXyz == true) {}  

If IsXyz resolves to the right, but then with lies! Operator, how is this code interpreted? Because RHS is right, it will be:

1) False for LHS. Right for RHS == False (from the table days of my truth)

Let's assume that Bull resolves the truth, I can think that there will be many strange ways to understand this code. What is the official way of compiler? According to the C # operator preference, it should be evaluated <

(

Thus false (LHS) and True (RHS)


No comments:

Post a Comment