How to

find out whether year is leap year

Published: 24. October 2011 | Updated: 26. October 2011
License: Microsoft Public License (MS-PL)
Categories: Framework » DateTime & TimeSpan
Tags: C# DateTime
Was this snippet helpful for you? YESYES / NONO
bool isLeapYear = DateTime.IsLeapYear(2012);

Console.WriteLine(isLeapYear);
Console Output:
True
Send us feedback about this snippet »



Related Snippets: