Saturday, December 27, 2014

equals

Shortest way.
public override bool equals(obj): 
    T that
    return obj != null
        && (that = obj as T) != null
        && this.x == that.x

No comments:

Post a Comment