DateTimeOffset.Addition(DateTimeOffset, TimeSpan) Operator
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a specified time interval to a DateTimeOffset object that has a specified date and time, and yields a DateTimeOffset object that has new a date and time.
public:
static DateTimeOffset operator +(DateTimeOffset dateTimeOffset, TimeSpan timeSpan);
public:
static DateTimeOffset operator +(DateTimeOffset dateTimeTz, TimeSpan timeSpan);
public static DateTimeOffset operator +(DateTimeOffset dateTimeOffset, TimeSpan timeSpan);
public static DateTimeOffset operator +(DateTimeOffset dateTimeTz, TimeSpan timeSpan);
static member ( + ) : DateTimeOffset * TimeSpan -> DateTimeOffset
static member ( + ) : DateTimeOffset * TimeSpan -> DateTimeOffset
Public Shared Operator + (dateTimeOffset As DateTimeOffset, timeSpan As TimeSpan) As DateTimeOffset
Public Shared Operator + (dateTimeTz As DateTimeOffset, timeSpan As TimeSpan) As DateTimeOffset
Parameters
- dateTimeOffsetdateTimeTz
- DateTimeOffset
The object to add the time interval to.
- timeSpan
- TimeSpan
The time interval to add.
Returns
An object whose value is the sum of the values of dateTimeTz and timeSpan.
Exceptions
The resulting DateTimeOffset value is less than DateTimeOffset.MinValue.
-or-
The resulting DateTimeOffset value is greater than DateTimeOffset.MaxValue.
Remarks
The