Fixing “CS891: The Type Name Only Contains Lower-Cased ASCII Characters”

If you’ve been an early adopter of .NET 7, you may have come across the following error in your travels when compiling an existing .NET 6 project :

Warning CS8981: The type name only contains lower-cased ascii characters. Such names may become reserved for the language.

While the warning is somewhat descriptive, it doesn’t really go into depth about why it’s showing. Especially when in .NET 6 the code compiled just fine!

Let’s look at a dead simple example of why this warning has been added.

Let’s imagine you are writing C# code many years ago in .NET 2.0, and you have code that looks like so :

class async {

At this time, async/await did not exist in .NET and you would have been fine to create a class named using either of those keywords, even if they didn’t necessarily confine to your traditional PascalCase naming standards.

Our rolls C# 5 and with it, the async/await keywords. Now we have issues because your own class has a naming clash. Ugh!

Remembering that Microsoft is on a roll with yearly releases of .NET/C#, it stands to reason that they may add additional reserved keywords in the future of C#, but until that time, Microsoft obviously can’t reserve every possible combination of keywords they might need in the future.

With all of that in mind, Microsoft have instead called out the fact that all reserved keywords are completely lowercase, if you avoid naming conventions that avoid naming everything in lowercase, then you can be sure in the future there will be no clash. Remembering that C# itself is case sensitive!

Again, this is only a warning, and you can choose to ignore it, but do so at your own peril.

This may also add a clue as to which games are currently paying out, you’ll need to wait the timer out. Bonus wagering x45 wr, free spins wagering x35 WR on free spin This bonus are valid for all new players from Germany, Australia, Canada, New Zealand, Poland, Finland, South Africa, Czeck Rebuplic, Slovakia, Indonesia, Ireland, Sweden, Norway, India, Spain +18, T&C apply SIGN UP FOR 150 FREE SPINS AND $500/€300 BONUS XPOKIES CASINO GIVES UP TO $2000 IN BONUSES + 100 FREE SPINS XPOKIES casino gives a welcome bonus package including 100 free spins and $2000 in bonus money, just sign up a new account and make a first deposit with the bonus code WELCOMEX1 to get 200% bonus up to $1000 + 50 free spins on Cash Bandits 2. Winnings from free spins are subjected to 25x wagering prior to withdrawal Pin-Up Casino. In the case of welcome bonuses, this casino has the highest winnings of the bonuses given when registering.

Leave a Comment