1 | initial version |
You can follow these steps to display the present date and time in the text property of your C# Windows Form application:
Type the following code in the editor:
DateTime dt = DateTime.Now; label1.Text = "Current Date and Time: " + dt.ToString();
Click OK to close the editor and save the changes.