Class
DateTimeInterval

Represents a time interval defined by two DateTime values.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

cs-api-definition
[TypeConverter(typeof(DateTimeIntervalConverter))]
public class DateTimeInterval : INotifyPropertyChanged, IEquatable<DateTimeInterval>, ICloneable

Inheritance: objectDateTimeInterval

Implements: ICloneableIEquatable<DateTimeInterval>INotifyPropertyChanged

Constructors

DateTimeInterval()

Initializes a new instance of the DateTimeInterval class.

Declaration

cs-api-definition
public DateTimeInterval()

DateTimeInterval(DateTime, DateTime)

Initializes a new instance of the DateTimeInterval class.

Declaration

cs-api-definition
public DateTimeInterval(DateTime start, DateTime end)

Parameters

start

DateTime

The start of the interval.

end

DateTime

The end of the interval.

DateTimeInterval(DateTime, TimeSpan)

Initializes a new instance of the DateTimeInterval class.

Declaration

cs-api-definition
public DateTimeInterval(DateTime start, TimeSpan duration)

Parameters

start

DateTime

The start of the interval.

duration

TimeSpan

The duration of the interval.

Properties

Duration

Gets or sets the duration of the interval.

Declaration

cs-api-definition
[Browsable(false)]
public virtual TimeSpan Duration { get; set; }

Property Value

TimeSpan

The duration of the interval.

Empty

Represents an empty DateTimeInterval value.

Declaration

cs-api-definition
public static DateTimeInterval Empty { get; }

Property Value

DateTimeInterval

End

Gets or sets the end of the interval.

Declaration

cs-api-definition
public virtual DateTime End { get; set; }

Property Value

DateTime

The end of the interval.

Start

Gets or sets the start the start of the interval.

Declaration

cs-api-definition
public virtual DateTime Start { get; set; }

Property Value

DateTime

The start the interval.

Methods

Clone()

Declaration

cs-api-definition
public virtual DateTimeInterval Clone()

Returns

DateTimeInterval

Contains(DateTime)

Determines whether the specified date is contained in this interval.

Declaration

cs-api-definition
public bool Contains(DateTime date)

Parameters

date

DateTime

The date.

Returns

bool

true if this interval contains the specified date; otherwise, false.

Contains(DateTimeInterval)

Determines whether this interval contains another interval.

Declaration

cs-api-definition
public bool Contains(DateTimeInterval other)

Parameters

other

DateTimeInterval

The other.

Returns

bool

true if this inerval contains the other interval; otherwise, false.

Equals(DateTimeInterval)

Declaration

cs-api-definition
public bool Equals(DateTimeInterval other)

Parameters

other

DateTimeInterval

Returns

bool

Implements IEquatable<DateTimeInterval>.Equals(DateTimeInterval)

Equals(object)

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

Returns

bool

Overrides object.Equals(object)

GetHashCode()

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

Overrides object.GetHashCode()

IntersectsWith(DateTimeInterval)

Determines whether this interval intersects with the specified interval.

Declaration

cs-api-definition
public bool IntersectsWith(DateTimeInterval other)

Parameters

other

DateTimeInterval

The other interval.

Returns

bool

IntersectsWithGreaterEnd(DateTimeInterval)

Determines whether this interval intersects with the specified interval.

Declaration

cs-api-definition
public bool IntersectsWithGreaterEnd(DateTimeInterval other)

Parameters

other

DateTimeInterval

The other interval.

Returns

bool

IsNullOrEmpty(DateTimeInterval)

Determines whether the specified DateTimeInterval is null or empty.

Declaration

cs-api-definition
public static bool IsNullOrEmpty(DateTimeInterval interval)

Parameters

interval

DateTimeInterval

The interval.

Returns

bool

true if the specified DateTimeInterval is null or empty; otherwise, false.

OnPropertyChanged(string)

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

ToString()

Declaration

cs-api-definition
public override string ToString()

Returns

string

Overrides object.ToString()

Events

PropertyChanged

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged