Possible Duplicate:
Can constructors be async
I have a class Example that pulls several information from the internet on creation.
public class Example
{
string information;
public Example()
{
//Pull information
}
}
Now I would like to let Example become awaitable because it is important that Example is created before continuing the part after creation.
public async void SetupSomething()
{
Example ex = new Example();
await ex;
// Do something with ex
}
How can I do this?