DateTimeRange Class
Namespace: PTS.Modules.DateTimeRangeComponent
Assembly: PTS.Modules.DateTimeRangeComponent.dll
Represents interval in time.
Syntax
public class DateTimeRange : IEquatable<DateTimeRange>
Inheritance
System.Object
DateTimeRange
Implements
System.IEquatable<DateTimeRange>
Constructors
DateTimeRange()
Initializes a new default instance of the DateTimeRange.
Declaration
public DateTimeRange()
DateTimeRange(DateTime, DateTime)
Initializes a new instance of the DateTimeRange with the start and end DateTime
values.
Declaration
public DateTimeRange(DateTime startsOn, DateTime endsOn)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | startsOn | The start of the time range interval. |
System.DateTime | endsOn | The end of the time range interval. |
Properties
EndsOn
Gets the end of the time interval.
Declaration
public DateTime EndsOn { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
StartsOn
Gets the start of the time interval.
Declaration
public DateTime StartsOn { get; }
Property Value
Type | Description |
---|---|
System.DateTime |
Methods
Equals(DateTimeRange)
Indicates whether the current date time range is equal to another.
Declaration
public bool Equals(DateTimeRange other)
Parameters
Type | Name | Description |
---|---|---|
DateTimeRange | other | An |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.IEquatable<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()