Get Tomorrow to add one day to today - CSharp Language Basics

CSharp examples for Language Basics:Date Time

Description

Get Tomorrow to add one day to today

Demo Code

using System;/*from  w w  w  . j a  v  a2 s.c  o  m*/
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
   static void Main(string[] args)
   {
      // Today's date
      DateTime today = DateTime.Today;
      // Tomorrow's date
      DateTime tomorrow = today.AddDays(1);
      // Output
      Console.WriteLine("Today is " + today.ToShortDateString() + ".");
      Console.WriteLine("I will start learning on " + tomorrow.ToShortDateString() + ".");
   }
}

Result


Related Tutorials