c# - Consolidating await statements -
i consolidate following statements 1 line.
var x = await a.method1async(); var y = await x.method2async(); var z = await y.method3async();
is possible remove intermediate objects , have in 1 line ?
you need parentheses:
var z = await (await (await a.method1async()).method2async()).method3async();
Comments
Post a Comment