Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Task.Run(()=>outTextToConsole())
if you need to wait for the completion of the task, then add await, you get await Task.Run,
but this is the creation of a thread on the CPU, all methods that have the nature of working with a disk, network, etc. that can return a result on interruption, as a rule, they already return a result of type Task and have an Async suffix
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question