New to Telerik UI for WPFStart a free 30-day trial

A class that represents time range.

Definition

Constructors

Initializes a new instance of the DateSpan class.

C#
public DateSpan()

Initializes a new instance of the DateSpan class with the given start and end time.

C#
public DateSpan(DateTime start, DateTime end)
Parameters:startDateTime

The start time of the instance.

endDateTime

The end of the instance.

Initializes a new instance of the DateSpan class with the given start time and duration.

C#
public DateSpan(DateTime start, TimeSpan duration)
Parameters:startDateTime

The start time of the instance.

durationTimeSpan

The duration of the instance.

Initializes a new instance of the DateSpan class from another date span instance.

C#
public DateSpan(IDateSpan other)
Parameters:otherIDateSpan

Another date span instance that is used to create a new instance.

Properties

Gets or sets the end DateTime of the IDateSpan.

C#
public DateTime End { get; set; }

Implements: IDateSpan.End

Gets or sets the start DateTime of the IDateSpan.

C#
public DateTime Start { get; set; }

Implements: IDateSpan.Start

Methods

Determines whether the specified object is equal to this instance.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with this instance.

Returns:

bool

true if the specified object is equal to this instance; otherwise, false.

Overrides: object.Equals(object)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current System.Object.

Overrides: object.GetHashCode()

Returns a string that represents this instance.

C#
public override string ToString()
Returns:

string

A string that represents this instance.

Overrides: object.ToString()