## DateTimeOffset::AddYears method


Adds a specified number of years to the [DateTimeOffset](../) object.

```cpp
DateTimeOffset System::DateTimeOffset::AddYears(int years) const
```


| Parameter | Type | Description |
| --- | --- | --- |
| years | int | Positive or negative number of years. |

### ReturnValue

Result of operation.

## See Also

* Class [DateTimeOffset](../)
* Class [DateTimeOffset](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
