help
Root Question Message
static
async public
to public async
and see if it works thennew Task()
btwTask task = StreamSample.StreamSampleMain()
and Task task = new Task(StreamSample.StreamSampleMain)
?new Task
you have to remember to start the task yourself. Look at https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/task-based-asynchronous-programming#creating-and-running-tasks-explicitly for more infoawait task
either way?Task task = new Task(...);
task.Start();
await task();
Task task = AsyncStuff();
await task();