The asynchronous method is not followed by lines of code

In the asynchronous approach the method is called as usual, but control returns to the caller before the asynchronous method is completed. After that, execution of the caller continues.

Noncompliant Code Example

Text = "Warning text";
ShowMessageBox( , Text);
Message("Warning is closed");

Compliant Solution

Text = "Warning text";
Await DoMessageBoxAsync(Text);
Message("Warning is closed");

See