/// <summary> /// Determines whether two instances have same range. /// </summary> /// <param name="other">The other instance to compare.</param> /// <returns><c>true</c> if two instances have same range; otherwise <c>false</c>.</returns> public bool Equals(Range other) { return min == other.min && max == other.max; }
/// <summary> /// Determines whether the range contains another range. /// </summary> /// <param name="other">The range to be determined.</param> /// <returns><c>true</c> if the range contains the other range; otherwise <c>false</c>.</returns> public bool Contains(Range other) { return !IsEmpty && !other.IsEmpty && min <= other.min && max >= other.max; }