DateTimeInterval
Represents a time interval defined by two DateTime values.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
[TypeConverter(typeof(DateTimeIntervalConverter))]
public class DateTimeInterval : INotifyPropertyChanged, IEquatable<DateTimeInterval>, ICloneable
Inheritance: objectDateTimeInterval
Implements:
Constructors
Initializes a new instance of the DateTimeInterval class.
public DateTimeInterval()
Initializes a new instance of the DateTimeInterval class.
Initializes a new instance of the DateTimeInterval class.
Properties
Gets or sets the duration of the interval.
[Browsable(false)]
public virtual TimeSpan Duration { get; set; }
The duration of the interval.
Represents an empty DateTimeInterval value.
public static DateTimeInterval Empty { get; }
Gets or sets the end of the interval.
public virtual DateTime End { get; set; }
The end of the interval.
Methods
Creates a separate interval with the same start and end values.
Determines whether this interval contains another interval.
public bool Contains(DateTimeInterval other)
The other.
Returns:true if this inerval contains the other interval; otherwise, false.
Determines whether another interval has the same start and end values.
public bool Equals(DateTimeInterval other)
The interval to compare with this instance.
Returns:Implements:
Determines whether another object is a DateTimeInterval with the same start and end values.
Returns a hash code derived from the interval's start and end values.
public override int GetHashCode()
A hash code consistent with Equals(DateTimeInterval).
Overrides:
Determines whether this interval intersects with the specified interval.
public bool IntersectsWith(DateTimeInterval other)
The other interval.
Returns:Determines whether this interval intersects with the specified interval.
public bool IntersectsWithGreaterEnd(DateTimeInterval other)
The other interval.
Returns:Determines whether the specified DateTimeInterval is null or empty.
public static bool IsNullOrEmpty(DateTimeInterval interval)
The interval.
Returns:true if the specified DateTimeInterval is null or empty; otherwise, false.
Raises PropertyChanged for the specified interval property.
protected virtual void OnPropertyChanged(string propertyName)
The name of the changed property.
Formats an empty interval as Empty and other intervals as [start - end] using the current culture.