Click or drag to resize

DateRangeToOffset Method

Converts the value of the current DateRange object to the date range specified by an offset value.

Namespace: InnerDrive.Core
Assembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.0.8475.0
Syntax
C#
public DateRange ToOffset(
	TimeSpan offset
)

Parameters

offset  TimeSpan
The offset to convert the DateRange value to.

Return Value

DateRange
A DateRange object that is equal to the original DateRange object; that is, the Upper and Lower members return identical points of time, but whose Offset properties are set to offset
Exceptions
ExceptionCondition
ArgumentExceptionThe resulting Upper or Lower members have unrepresentable DateTimeOffset values.
ArgumentOutOfRangeExceptionoffset is greater than 14 hours

- or -

offset is less than -14 hours

See Also