What is a Task in c#. And why a method declared with the Task return type can return nothing just like void. | Sololearn: Learn to code for FREE!

+3

What is a Task in c#. And why a method declared with the Task return type can return nothing just like void.

i was researching in depth about async await in c# and i came across this syntax. void Task methodName(){ do some work....... but there's no return statement } which made me think. What is a Task then ? Note : i know Task is used to do async work and create background threads, so don't tell me this please.

4/4/2018 3:54:43 PM

jay

1 Answer

New Answer

+2

https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/task-based-asynchronous-programming