I\'m trying to make a countdown using C# and show the time in format:
hour:minutes:seconds
I\'ve tried this:
var minutes
Your code sets up the variables then goes to sleep for 3 minutes so the if-statement isn't executed until it leaves the sleep state. Either set up a new thread to update the UI or do something like this...
while (DateTime.now < end) {
label1.Text = "...";
Thread.Sleep(#); //Pick a second, or 5 or whatever
}
label1.Text = "Done!";
With a 2nd thread you can still do stuff in your program while it works. "Done!" will appear once it finishes.