Waits for all of the provided System.Threading.Tasks.Task objects to complete execution.
tasks An array of System.Threading.Tasks.Task instances on which to wait.