CSharp examples for System:DateTime Time
Set Time
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from www. j a v a2s. c om*/ public class Main{ public static DateTime SetTime(this DateTime dt, int hour, int minute) { return new DateTime(dt.Year, dt.Month, dt.Day, hour, minute, 0); } }