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

CSharp examples for System:DateTime Year

Description

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

Demo Code


using System;//from   w ww. ja  v  a2  s  .c om

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

Related Tutorials