DateTime

  • Thread starter Thread starter JD
  • Start date Start date
J

JD

I would like to show a message box and a date, i can how to do it in c++,
but as i'm learning c#

this is the code i've done

using System;

class myApp

{

public static void Main()

{

DateTime CurrTime = DateTime.Today;

Console.WriteLine(CurrTime.Day);

Console.WriteLine(CurrTime.Month);





if (CurrTime.Day = "27" + CurrTime.Month ="10")

{

Console.WriteLine("Birthday");

}

else

{

Console.WriteLine("Not Birthday");

}

Console.ReadLine();

}

}
 
DateTime dt = DateTime.Now;
MessageBox.Show(dt.ToShortDateString());
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top