Exemplo n.º 1
0
 public override bool Equals(float?x, float?y)
 {
     return
         (x == null && y == null ? true
     : x == null || y == null ? false
     : BitwiseSingleEqualityComparer.Equals(x.Value, y.Value));
 }
 // The hash code for null is just a constant which is at least *unlikely* to be used
 // elsewhere. (Compared with 0, say.)
 public override int GetHashCode(float?obj)
 {
     return(obj == null ? 293864 : BitwiseSingleEqualityComparer.GetHashCode(obj.Value));
 }