How to await asynchronous tasks in the constructor in C#
For original inspiration see this excellent link by Stephen Cleary: http://blog.stephencleary.com/2013/01/async-oop-2-constructors.html Step 1: Create a new WPF application Step 2: Define your example service In this example, a service to count the number of bytes in a web page: MyStaticService.cs Step 3: Define a type for obtaining the results or errors This method takes a …
Continue reading ‘How to await asynchronous tasks in the constructor in C#’ »