Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
Example of Task, async and await operator in C# in a Console Application by Vibs Vibs
LongRunningOperation() Started
Independent Works of now executes in MyMethodAsync()
Cursor Moved to Next Line Without Waiting for MyMethodAsync() completion
Now Waiting for Task to be Finished
LongRunningOperation() Finished after 2 Seconds
Result of LongRunningOperation() is 1
Exiting CommandLine
Cached Result
Last Run: 2:24:56 am
Compile: 0.126s
Execute: 2.014s
Memory: 152kb
CPU: 0.016s