find out whether year is leap year
Published: 24. October 2011 | Updated: 26. October 2011License: Microsoft Public License (MS-PL)
Categories: Framework » DateTime & TimeSpan
Tags: C# DateTime
bool isLeapYear = DateTime.IsLeapYear(2012); Console.WriteLine(isLeapYear);Console Output:
True
| Send us feedback about this snippet » |





