Noda Time
Interval Structure
NamespacesNodaTimeInterval

[This is preliminary documentation and is subject to change.]

An interval between two instants in time (start and end).
Declaration Syntax
C#Visual BasicVisual C++
public struct Interval : IEquatable<Interval>, 
	IXmlSerializable
Public Structure Interval _
	Implements IEquatable(Of Interval), IXmlSerializable
public value class Interval : IEquatable<Interval>, 
	IXmlSerializable
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
Interval(Instant, Instant)
Initializes a new instance of the Interval struct. The interval includes the start instant and excludes the end instant. The end may equal the start (resulting in an empty interval), but must not be before the start.

Contains(Instant)
Returns whether or not this interval contains the given instant.

Duration
Returns the duration of the interval.

End
Gets the end instant - the exclusive upper bound of the interval.

Equality(Interval, Interval)
Implements the operator ==.

Equals(Interval)
Indicates whether the value of this interval is equal to the value of the specified interval.

Equals(Object)
Determines whether the specified Object is equal to this instance.
(Overrides ValueType.Equals(Object).)
GetHashCode()()()()
Returns the hash code for this instance.
(Overrides ValueType.GetHashCode()()()().)
Inequality(Interval, Interval)
Implements the operator !=.

Start
Gets the start instant - the inclusive lower bound of the interval.

ToString()()()()
Returns a string representation of this interval. The format of this string is not yet specified, and may change without notice.
(Overrides ValueType.ToString()()()().)
Remarks

The interval includes the start instant and excludes the end instant, unless the end instant is MaxValue in which case it's deemed to be inclusive. (An interval stretching to infinity includes the end of time.)

The end may equal the start (resulting in an empty interval), but will not be before the start.

Thread Safety
This type is an immutable value type. See the thread safety section of the user guide for more information.

Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)