Coroutines in C#
I believe with the new .NET 4.5\C# 5 the async\await pattern should meet your needs. async Task<string> DownloadDocument(Uri uri) { var webClient = new WebClient(); var doc = await webClient.DownloadStringTaskAsync(url); // do some more async work return doc; } I suggest looking at http://channel9.msdn.com/Events/TechEd/Australia/Tech-Ed-Australia-2011/DEV411 for more info. It is a great presentation. Also http://msdn.microsoft.com/en-us/vstudio/gg316360 has … Read more