RosettaCodeData/Task/Flow-control-structures/C-sharp/flow-control-structures-4.cs

6 lines
162 B
C#

async Task DoStuffAsync() {
DoSomething();
await someOtherTask;//returns control to caller if someOtherTask is not yet finished.
DoSomethingElse();
}