Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DateTime.IsLeapYear Method

Returns an indication whether the specified year is a leap year.

[Visual Basic]
Public Shared Function IsLeapYear( _
   ByVal year As Integer _
) As Boolean
public static bool IsLeapYear(
 int year
public: static bool IsLeapYear(
 int year
public static function IsLeapYear(
   year : int
) : Boolean;


A 4-digit year.

Return Value

true if year is a leap year; otherwise, false.


year is specified as a 4-digit base 10 number; for example, 1996.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

DateTime Structure | DateTime Members | System Namespace

© 2017 Microsoft