Calendar.GetYear Method (DateTime)

 

When overridden in a derived class, returns the year in the specified DateTime.

Namespace:   System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

abstract GetYear : 
        time:DateTime -> int

Parameters

time
Type: System.DateTime

The DateTime to read.

Return Value

Type: System.Int32

An integer that represents the year in time.

The following code example demonstrates the members of the Calendar class.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: