All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.csharp.rules.csharpsquid.AsyncAwaitIdentifier.html Maven / Gradle / Ivy

Since C# 5.0, async and await are contextual keywords. Contextual keywords do have a particular meaning in some contexts, but can still be used as variable names for example. Keywords, on the other hand, are always reserved, and therefore are not valid variable names. To avoid any confusion though, it is best to not use async and await as identifiers.

The following code:

int await = 42;         // Non-Compliant

should be refactored into:

int someOtherName = 42; // Compliant




© 2015 - 2025 Weber Informatics LLC | Privacy Policy