CSharp examples for System:DateTime Second
Will give you the DateTime object given the number of seconds you go forward.
using System;//from w ww.ja v a 2s .co m public class Main{ /// <summary> /// Will give you the DateTime object given the number of seconds you go forward. /// </summary> /// <param name="seconds"> /// The days. /// </param> /// <returns> /// DateTime object /// </returns> public static DateTime SecondsFromNow(this int seconds) { var t = new TimeSpan(0, 0, seconds); return DateTime.Now.Add(t); } }