Constructor DateTimeRange
DateTimeRange(DateTime, DateTime)
Creates a new DateTimeRange instance from two System.DateTime values.
Declaration
public DateTimeRange(DateTime start, DateTime end)
Parameters
| Type | Name | Description |
|---|---|---|
| System.DateTime | start | The date and time at which this date range starts. |
| System.DateTime | end | The date and time at which this date range ends. |
Remarks
The start must be less than or equal to end, otherwise an System.ArgumentException will be thrown. To create an instance without worrying about the order of the date arguments, use Create(DateTime, DateTime).