CSharp examples for System:DateTime Year
Returns an indication whether the year passed as method parameter is a leap year
using System.Globalization; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from ww w . j av a 2 s .c om*/ public class Main{ /// <summary> /// Returns an indication whether the year passed as method parameter is a leap year /// </summary> /// <param name="year"></param> /// <returns></returns> public static bool IsLeapYear(int year) { return DateTime.IsLeapYear(year); } }