Task.Delay() not behaving as expected
Task.Delay returns a Task object on which you have to wait. Otherwise the following code will be executed immediately. Therfore you have to declare your method as async. Then you can await Task.Delay public async Task ChattyWriter() { int count = 0; while (true) { var message = String.Format(“Chatty Writer number {0}”, count); Trace.WriteLine(message); count++; … Read more