The reason behind the "Cannot implicitly convert type System.Threading.Tasks.Task to XXX"

A quick article this time about an error message in C# when dealing with asynchronous code calls.

To solve this error you will have to check the calling code of an asynchronous method. Is the await keyword used when calling the method? If not then you will get the Cannot implicitly convert type System.Threading.Tasks.Task<XXX> to XXX error.

Simple add the await keyword on the line calling the asynchronous method ;)

comments powered by Disqus