DateOptions.AddYears method
Returns a date that is the specified number of years away from the specified date.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Function AddYears ( _
cDate As SimpleDate, _
nYears As Integer _
) As SimpleDate
'Usage
Dim instance As DateOptions
Dim cDate As SimpleDate
Dim nYears As Integer
Dim returnValue As SimpleDate
returnValue = instance.AddYears(cDate, _
nYears)
public SimpleDate AddYears(
SimpleDate cDate,
int nYears
)
Parameters
cDate
Type: Microsoft.SharePoint.Utilities.SimpleDateThe SimpleDate to which to add years.
nYears
Type: System.Int32The number of years to add.
Return value
Type: Microsoft.SharePoint.Utilities.SimpleDate
A SimpleDate value that represents the date that results from adding the specified number of years to the specified SimpleDate value.