Can I configure to use UPPER_CASE for constants and enums?
Since my early days programming in C, I’ve always had the habit of declaring constants in UPPER_CASE, and I’d like to keep that naming convention in the .NET ecosystem. For that, I want to configure Visual Studio to automatically fix naming violations.
As shown in the image, I managed to set this up for private and static fields, but I couldn’t find a way to apply the same rule to enums and constants. I’ve tried several times without success.
When I declare a constant, I don’t want it to be CreditCard, I’d prefer CREDIT_CARD. The same goes for enums: instead of DebitCard, I’d like to use DEBIT_CARD.
Does anyone know how to configure this in Visual Studio?
Posted Oct 30, 2025, 4:01 PM UTC
04