I've already search and read about, I just want to make sure if I am right. I have three methods that I want to run in parallel, and I want to make sure that all of them are done before continue. They are all async, and this code are inside an async method. I've done this:
public async ProcessBegin() {
//... some code
await SomeProcess();
await AnotherMethod().
}
public async SomeProcess() {
//.. some code
var tasks = new Task[3];
tasks[0] = method1();
tasks[1] = method2();
tasks[2] = method3();
Task.WaitAll(tasks);
}
public async Method1(){...}
public async Method2(){...}
public async Method3(){...}
Is this right?