Skip to main content

DateTimeRange Methods

A structure that specifies a time interval with the [start, end). mathematical formula.
Name Description
Contains(DateTimeRange) Checks whether the range contains the specified date-time value.
Contains(DateTime, Boolean) Checks whether the current range contains the specified date-time range.
Equals(DateTimeRange) Defines whether the specified DateTimeRange is equal to the current DateTimeRange instance.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Defines whether the specified object is equal to the current DateTimeRange instance.
GetHashCode() Gets the hash code (a number) that corresponds to the value of the current TimeInterval object.
GetType() Gets the Type of the current instance. Inherited from Object.
Intersect(DateTimeRange, DateTimeRange, Boolean) static Checks whether the date time range intersects with two specified ranges.
Intersect(DateTimeRange, Boolean) Computes the intersection of the current range with the specified range.
IntersectsWith(DateTimeRange, DateTimeRange, Boolean) static Computes the intersection of the specified ranges.
IntersectsWith(DateTimeRange, Boolean) Checks whether the time range intersects with the specified range.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
ToString() Returns the textual representation of the datetime range.
ToString(IFormatProvider) Returns a culture-specific string representation of the time range.
ToString(String, IFormatProvider) Returns a string that represents the range. The return string uses the specified format string to format the result in a culture-specific template.
TryParse(String, CultureInfo, out DateTimeRange) static Tries to parse the specified string and convert it into the date-time range.
Union(DateTimeRange, DateTimeRange) static Computes the union of the current range and the specified range.
Union(DateTimeRange) Computes the union of the specified ranges.
See Also