CSharp examples for System:DateTime Time
Set Time to DateTime
using System.Globalization; using System.Collections.Generic; using System;//from w w w . j a va2 s .c o m public class Main{ public static DateTime SetTime(this DateTime src, int hours, int mins, int seconds) { return new DateTime(src.Year, src.Month, src.Day, hours, mins, seconds, src.Kind); } }