Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 497 Bytes

MA0134.md

File metadata and controls

15 lines (11 loc) · 497 Bytes

MA0134 - Observe result of async calls

The result of awaitable method should be observed by using await, Result, Wait, or other methods.

Note: CS4014 is similar but only operate in async methods. MA0134 operates in non-async methods.

void Sample()
{
    Task.Delay(1); // non-compliant

    Task.Delay(1).Wait(); // ok
    _ = Task.Delay(1);    // ok
}