Please look at the following piece of code:

var left = GetSomeEmptyCollection()?.FirstOrDefault(); var b1 = left == null; //left в данном случае == null, как на картинке Debug.WriteLine(b1); //Но, почему получается, что b1 == false ??? 

enter image description here

Why b1 == false ???

  • 7
    What type of left ? Is this type of comparison operator overloaded? - PetSerAl
  • 3
    Oh thanks! Yes, overloaded :)) Now I know where to look for the error :))) - Andrey K.
  • four
    To less wang - give a minimal reproducible example . - αλεχολυτ
  • one
    @nick_n_a, the answers are in the answers. - Qwertiy

0