How can I get the current time in C#?

c#

Solution

DateTime.Now.ToString("HH:mm:ss tt");

this gives it to you as a string.

Problem

I need to get the current time in C# but when I create a DateTime object, the time is set to 00:00:00. How can I get the current instance of time?

Original source

Related problems