CSharp examples for System:DateTime Calculate
Gets a DateTime representing noon on the current date
using System;/*from ww w. j ava 2 s . c om*/ public class Main{ /// <summary> /// Gets a DateTime representing noon on the current date /// </summary> /// <param name="current">The current date</param> public static DateTime Noon(this DateTime current) { var noon = new DateTime(current.Year, current.Month, current.Day, 12, 0, 0); return noon; } }