Indicates whether the current Nullable`1 object is equal to a specified object.
![]()
true if the other parameter is equal to the current Nullable`1 object; otherwise, false.
This table describes how equality is defined for the compared values:
true The Nullable`1.HasValue property is false, and the other parameter is null. That is, two null values are equal by definition.
-or-
The Nullable`1.HasValue property is true, and the value returned by the Nullable`1.Value property is equal to the other parameter.
false The Nullable`1.HasValue property for the current Nullable`1 structure is true, and the other parameter is null.
-or-
The Nullable`1.HasValue property for the current Nullable`1 structure is false, and the other parameter is not null.
-or-
The Nullable`1.HasValue property for the current Nullable`1 structure is true, and the value returned by the Nullable`1.Value property is not equal to the other parameter.
If the Nullable`1.HasValue property of the current Nullable`1 structure is true, equality is determined by passing the other parameter to the Equals method of the underlying value of the current Nullable`1 structure.