System Namespace DateTime Structure
Adds the specified number of years to the value of this instance.
[ VB ]
<Serializable>
Public Function AddYears ( _
ByVal value As Integer _
} As DateTime
[ C# ]
[ Serializable ]
public DateTime AddYears (
int value
};
[ C++ ]
[ Serializable ]
public: DateTime AddYears (
int value
};
[ JScript ]
public Serializable
function AddYears (
value : int
} : DateTime;
- value
- A number of years. The value parameter can be negative or positive.
A DateTime whose value is the sum of the date and time represented by this instance and the number of years represented by value.
This method does not change the value of this DateTime. Instead, a new DateTime is returned whose value is the result of this operation.
DateTime Members Double