Is it possible to await an event instead of another async method?
In my C#/XAML metro app, there’s a button which kicks off a long-running process. So, as recommended, I’m using async/await to make sure … Read more
In my C#/XAML metro app, there’s a button which kicks off a long-running process. So, as recommended, I’m using async/await to make sure … Read more
This has got me stumped. I was trying to optimize some tests for Noda Time, where we have some type initializer checking. I … Read more
This question already has answers here: Can’t specify the ‘async’ modifier on the ‘Main’ method of a console app (17 answers) Closed 5 … Read more
I have migrated a solution that is currently targeting .NET 4.0 in VS2010 to VS2012 and now I would like to re-target it … Read more
I may be missing something but what is the difference between doing: public void MyMethod() { Task t = Task.Factory.StartNew(DoSomethingThatTakesTime); t.Wait(); UpdateLabelToSayItsComplete(); } … Read more
I have 3 tasks: private async Task<Cat> FeedCat() {} private async Task<House> SellHouse() {} private async Task<Tesla> BuyCar() {} They all need to … Read more
I’m trying to understand async await in the simplest form. I want to create a very simple method that adds two numbers for … Read more
System.Net.Http.HttpClient and System.Net.Http.HttpClientHandler in .NET Framework 4.5 implement IDisposable (via System.Net.Http.HttpMessageInvoker). The using statement documentation says: As a rule, when you use an … Read more
This is the code I have so far: public class Class1 { private const string URL = “https://sub.domain.com/objects.json?api_key=123”; private const string DATA = … Read more
Under what scenarios would one want to use public async Task AsyncMethod(int num) instead of public async void AsyncMethod(int num) The only scenario … Read more