C#

C#

Made by DeepSource

An async method should have at least a single awaitable CS-W1047

Bug risk
Major

A method with async modifier indicates that it involves asynchronous work. Not having any await expressions inside the method makes the async modifier redundant and the method proceeds in a synchronous manner. Consider either adding appropriate await expressions or dropping the async modifier.

Bad Practice

public async void Foo()
{
    // Method has no await expressions
}

Recommended

public void Foo()
{
    // ...
}

Reference