What's the false operator in C# good for?

前端 未结 5 1556
無奈伤痛
無奈伤痛 2020-11-30 18:21

There are two weird operators in C#:

  • the true operator
  • the false operator

If I understand this right these operators can be used in typ

5条回答
  •  日久生厌
    2020-11-30 19:05

    The page you link to http://msdn.microsoft.com/en-us/library/6x6y6z4d.aspx says what they were for, which was a way of handling nullable bools before nullable value types were introduced.

    I'd guess nowadays they're good for the same sort of stuff as ArrayList - i.e. absolutely nothing.

提交回复
热议问题