C# Nullable Equality Operations, Why does null <= null resolve as false? [duplicate]
问题 This question already has answers here : Why does >= return false when == returns true for null values? (8 answers) Closed 2 years ago . Why is it that in .NET null >= null resolves as false, but null == null resolves as true? In other words, why isn't null >= null equivalent to null > null || null == null ? Does anyone have the official answer? 回答1: This behaviour is defined in the C# specification (ECMA-334) in section 14.2.7 (I have highlighted the relevant part): For the relational