Using Task.wait() application hangs and never returns
问题 I am new to C# and using Task . I was trying to run this application but my application hangs every time. When I am adding task.wait() , it keeps waiting and never returns. Any help is much appreciated. EDIT: I want to call DownloadString Asynchronously. And when I am doing task.Start() as suggested by "Austin Salonen" I don't get the address of location but default value in location string from returnVal. It means that location got value assigned before task got completed. How can I make