Asynchronous methods should have an Async suffix

Moved from GitHub

Posted by Aaronmsv:

It’s a convention in .NET to have the Async suffix on asynchronous methods. One example is the DgraphClient.Alter method. When following the convention it should be DgraphClient.AlterAsync.

For more information:

You should add “Async” as the suffix of every async method name you write.

This is the convention used in .NET to more easily differentiate synchronous and asynchronous methods. Certain methods that aren’t explicitly called by your code (such as event handlers or web controller methods) don’t necessarily apply. Because they are not explicitly called by your code, being explicit about their naming isn’t as important.

1 Like