Mono Class Library: System.DateTime Overview | Members

System.DateTime.Add Method

Adds the value of a specified TimeSpan instance to the current instance. [Edit]

public DateTime Add (TimeSpan value)

Parameters

value
A TimeSpan instance. [Edit]

Returns

A DateTime instance set to the sum of the date and time of the current instance and the time interval represented by value. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe resulting DateTime is less than DateTime.MinValue or greater than DateTime.MaxValue. [Edit]

Remarks

A specified TimeSpan is added to the current instance of DateTime, and the result is returned as a new DateTime. [Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0