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!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.

4th Apr 2018, 3:54 PM
jay
1 Answer