System.DateTimeOffset.Year Property

Gets the year component of the date represented by the current DateTimeOffset object.

Syntax

public int Year { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The DateTimeOffset.Year property is not affected by the value of the DateTimeOffset.Offset property.

You can also create a string representation of a DateTimeOffset object's year component by calling the erload:System.DateTimeOffset.ToString method with the "y", "yy", or "yyyy" custom format specifiers.

Requirements

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