New to Telerik UI for .NET MAUIStart a free 30-day trial

A class that represents time range.

Definition

Namespace:Telerik.Maui.Controls.Scheduler

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class DateRange : NotifyPropertyChangedBase, INotifyPropertyChanged, IDateRange

Inheritance: objectNotifyPropertyChangedBaseDateRange

Derived Classes: Slot

Implements: IDateRangeINotifyPropertyChanged

Inherited Members NotifyPropertyChangedBase.OnPropertyChanged(string)NotifyPropertyChangedBase.UpdateValue<T>(ref T, T, string)NotifyPropertyChangedBase.UpdateValue<T>(ref T, T, Action<T>, string)NotifyPropertyChangedBase.PropertyChanged

Constructors

Initializes a new instance of the DateRange class.

C#
public DateRange()

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

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

The start time of the instance.

endDateTime

The end of the instance.

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

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

The start time of the instance.

durationTimeSpan

The duration of the instance.

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

C#
public DateRange(IDateRange other)
Parameters:otherIDateRange

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

Properties

Gets or sets the end DateTime of the IDateRange.

C#
public DateTime End { get; set; }

Implements: IDateRange.End

Gets or sets the start DateTime of the IDateRange.

C#
public DateTime Start { get; set; }

Implements: IDateRange.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()