I am using Visual Studio 2010 and I am trying to change the timen on my PC to 11 pm the ``day before yesterday. My question is can somebody tell me what statement that will allow ``me to output directly to DOS using C#.
Sorry for the poorly written question. I was trying to change the time to 11:50 two days ago. I am not familar with programming in Windows I have always used Linux. In linux I would execute my file from the command line and output to the command line. But using Visual Studio I was not sure if outputting to the command line would output to Visual Studio or MS DOS. If there is a way of changing the timecin this way I would appreciate it.
In command propt I entered date 28/07/2010 and it changed the date but when I entered Console.WriteLine("date 28/07/2010") into Visual Studio 2010 the time stayed the same. Is this statement not outputting to the command prompt.
Thanks for any help
…assuming your application is started from the Command Line.
If you’re trying to execute something from the command line (rather than outputing to the command line), then you want:
System.Diagnostics.Process.Start