DateTime.IsLeapYear-Methode
Gibt eine Angabe darüber zurück, ob das angegebene Jahr ein Schaltjahr ist.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Shared Function IsLeapYear ( _
year As Integer _
) As Boolean
'Usage
Dim year As Integer
Dim returnValue As Boolean
returnValue = DateTime.IsLeapYear(year)
public static bool IsLeapYear (
int year
)
public:
static bool IsLeapYear (
int year
)
public static boolean IsLeapYear (
int year
)
public static function IsLeapYear (
year : int
) : boolean
Parameter
- year
Eine vierstellige Jahresangabe.
Rückgabewert
true, wenn year ein Schaltjahr ist, andernfalls false.
Ausnahmen
Ausnahmetyp | Bedingung |
---|---|
year ist kleiner als 1 oder größer als 9999. |
Hinweise
year wird als vierstellige Zahl zur Basis 10 angegeben, z. B. 1996.
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0, 1.0