Nito.AsyncEx is the library which can be used to add support for Console application. (not limited to console application.)
Add the nuget package - Nite.AsyncEx
And then call your function as
AsyncContext.Run(() => ExecuteMethodAsync());
private static async Task ExecuteMethodAsync()
{
//do something
}
Happy Coding!
Add the nuget package - Nite.AsyncEx
And then call your function as
AsyncContext.Run(() => ExecuteMethodAsync());
private static async Task ExecuteMethodAsync()
{
//do something
}
Happy Coding!
No comments:
Post a Comment