Quote:
(A) The return yield statement is missing at the end of the method.
There is no such thing in C# as
return yield
. There
is a
yield return
, but that's used in an iterator method. The only time you'd see that in an
async
method is if you're implementing an
async enumerable[
^] iterator. Since the question makes no mention of that, you can rule it out.
Quote:
(B) The yield keyword is missing from the method.
As above,
yield
only appears in iterator methods.
Quote:
(C) The method is missing an await keyword in its body.
As Gerry said, the method will run synchronously, and you will get a compiler warning. If it calls any
Task
-returning methods, it will potentially return before those tasks have completed.
Quote:
(D) The wait keyword is missing from the end of the method.
There is no
wait
keyword in C#.
By a process of elimination, the only possible correct answer is (C).