Task.ContinueWith() parent task doesn't wait for child task to finish [duplicate]
问题 This question already has answers here : Task.WaitAll doesn't wait for child task? (2 answers) Closed 5 years ago . Since I was understanding the Task in context of nested task, I really don't understand that- Why the 3rd print before 2nd print? Even though, I have used Task.WaitAll(t) , it print 3rd line before 2nd line. Code: public static void Main() { Task t = new Task( () => { Thread.Sleep(2000); Console.WriteLine("1st print..."); }); t.ContinueWith( x => { Thread.Sleep(2000); Console