Returns a DateTime representing the specified day in February in the specified year. - CSharp System

CSharp examples for System:DateTime Year

Description

Returns a DateTime representing the specified day in February in the specified year.

Demo Code


using System;//from  w w  w.j  ava 2s.c  o m

public class Main{
        /// <summary>
        /// Returns a DateTime representing the specified day in February
        /// in the specified year.
        /// </summary>
        public static DateTime February(this int day, int year)
        {
            return new DateTime(year, 2, day);
        }
}

Related Tutorials