// override object.Equals public override bool Equals(object obj) { // // See the full list of guidelines at // http://go.microsoft.com/fwlink/?LinkID=85237 // and also the guidance for operator== at // http://go.microsoft.com/fwlink/?LinkId=85238 // if (obj == null || GetType() != obj.GetType()) { return(false); } var timeRange = (TimeRange)obj; return(From.Equals(timeRange.From) && To.Equals(timeRange.To) && FromInclusive.Equals(timeRange.FromInclusive) && ToInclusive.Equals(timeRange.ToInclusive)); }
public bool Equals(ValueInterval other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (IsEmpty && other.IsEmpty) { return(true); } return(From.Equals(other.From) && To.Equals(other.To) && FromInclusive.Equals(other.FromInclusive) && ToInclusive.Equals(other.ToInclusive)); }