DateTime::IsLeapYear Method (Int32)
.NET Framework (current version)
Returns an indication whether the specified year is a leap year.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- year
-
Type:
System::Int32
A 4-digit year.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | year is less than 1 or greater than 9999. |
year is specified as a 4-digit base 10 number; for example, 1996.
year is always interpreted as a year in the Gregorian calendar. To determine whether a particular year was a leap year in some other calendar, call that calendar object's IsLeapYear method.
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
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
Show: