DateTime..::..IsLeapYear Method
Returns an indication whether the specified year is a leap year.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public static bool IsLeapYear( int year )
<TemplateAttribute> _ Public Shared Function IsLeapYear ( _ year As Integer _ ) As Boolean
[TemplateAttribute] public: static bool^ IsLeapYear( int^ year )
Parameters
- year
- Type: System..::..Int32
A 4-digit year.
Return Value
true if year is a leap year; otherwise, false.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentOutOfRangeException | year is less than 1 or greater than 9999. |