ComponentOne CalendarView for WinForms
C1.Globalization Namespace / JapaneseCalendarEx Class / AddYears Method
The System.DateTime to which to add years.
The number of years to add.

In This Topic
    AddYears Method
    In This Topic
    When overridden in a derived class, returns a System.DateTime that is the specified number of years away from the specified System.DateTime.
    Syntax
    'Declaration
     
    
    Public Overrides Function AddYears( _
       ByVal time As Date, _
       ByVal years As Integer _
    ) As Date
    public override DateTime AddYears( 
       DateTime time,
       int years
    )

    Parameters

    time
    The System.DateTime to which to add years.
    years
    The number of years to add.

    Return Value

    The System.DateTime that results from adding the specified number of years to the specified System.DateTime.
    Exceptions
    ExceptionDescription
    The resulting System.DateTime is outside the supported range of this calendar.
    years is outside the supported range of the System.DateTime return value.
    See Also