C# Enum Naming Conventions: Rules and Examples (.NET 10)

This is the enum I flag most often in code reviews, and it breaks three C# enum naming conventions at once: an Enum suffix, ALL_CAPS members and the type name repeated inside every value.

var status = OrderStatusEnum.ORDER_SHIPPED;
Console.WriteLine($"Order 1042: {status}");   // Order 1042: ORDER_SHIPPED

enum OrderStatusEnum { ORDER_PENDING, ORDER_SHIPPED, ORDER_DELIVERED }

The fix is enum OrderStatus { Pending, Shipped, Delivered }: a singular PascalCase type with plain PascalCase members. Below are the rest of Microsoft’s rules, run on .NET 10, plus a build that catches the mistakes for you.

C# Enum Naming Conventions Cheat Sheet

Every row comes from the .NET Framework Design Guidelines. For the other identifier types, see my guide to C# naming conventions.

RuleDoDon’t
PascalCase type and membersOrderStatus.ShippedorderStatus.SHIPPED
Singular name for a regular enumOrderStatusOrderStatuses
Plural name for a [Flags] enumDeliveryDaysDeliveryDay
No Enum, Flag or Flags suffixPaymentMethodPaymentMethodEnum
No E prefix on the typeCarrierECarrier
No type name inside member namesPaymentMethod.CardPaymentMethod.PaymentMethodCard
Zero value; call it None on flagsNone = 0Monday = 0
File named after the enumOrderStatus.csEnums.cs

Use PascalCase for the Enum Type and Every Member

An enum is a type, so you name it like a class: a PascalCase noun with no prefix (see C# class naming conventions). Its members are public constants, so they’re PascalCase too. Here’s an order tracker for a Portland coffee shop:

var order = new Order("Jenna Morales");
Console.WriteLine($"New order for {order.Customer}: {order.Status}");

order.Status = OrderStatus.Shipped;
Console.WriteLine($"After shipping: {order.Status}");
Console.WriteLine($"BillingCycle default: {default(BillingCycle)}");

enum OrderStatus { Pending, Shipped, Delivered, Canceled }
enum BillingCycle { Monthly = 1, Yearly = 12 }

class Order(string customer)
{
    public string Customer { get; } = customer;
    public OrderStatus Status { get; set; }
}

Output:

New order for Jenna Morales: Pending
After shipping: Shipped
BillingCycle default: 0
C# enum naming conventions in VS Code: singular PascalCase OrderStatus enum with Pending, Shipped, Delivered and Canceled members and the dotnet run output
A singular PascalCase enum prints clean names, and an enum without a 0 member defaults to 0

Jenna’s new order shows Pending without anyone setting it, because the first member is 0 and 0 is every enum’s default. BillingCycle has no 0 member, so its default prints a bare 0.

That’s why the guidelines ask you to give simple enums a zero value: None, or the most common default. New to enums? Start with my enum in C# tutorial.

Should a C# Enum Name Be Singular or Plural?

Singular, unless it’s a [Flags] enum. Your OrderStatus variable holds one status at a time, so the singular reads right. A flags variable holds several values combined with |, so the type gets a plural name:

var tylerDays = DeliveryDays.Monday | DeliveryDays.Wednesday | DeliveryDays.Friday;
Console.WriteLine($"Tyler Brooks gets deliveries on: {tylerDays}");
Console.WriteLine($"Includes Friday? {tylerDays.HasFlag(DeliveryDays.Friday)}");
Console.WriteLine($"Weekdays = {(int)DeliveryDays.Weekdays}");
Console.WriteLine($"Nothing picked yet: {default(DeliveryDays)}");

[Flags]
enum DeliveryDays
{
    None = 0,
    Monday = 1,
    Tuesday = 2,
    Wednesday = 4,
    Thursday = 8,
    Friday = 16,
    Weekdays = Monday | Tuesday | Wednesday | Thursday | Friday
}

Output:

Tyler Brooks gets deliveries on: Monday, Wednesday, Friday
Includes Friday? True
Weekdays = 31
Nothing picked yet: None
C# [Flags] enum with a plural name DeliveryDays, None = 0 and powers of two, printing Monday, Wednesday, Friday in the VS Code terminal
A plural [Flags] enum: None = 0, powers of two and a named Weekdays combination

Tyler’s pick prints as Monday, Wednesday, Friday, and the empty default prints None, not 0. Powers of two let the values combine, and Weekdays names a common combination (31).

Important: a flags enum’s zero value must be called None and mean no flags are set. If you store a HasFlag result, name it like a Boolean (isFridayDelivery); my Boolean variable naming guide has the patterns.

Don’t Add an Enum Suffix, an E Prefix or the Type Name to Members

The guidelines are blunt here: no Enum, Flag or Flags suffix, and no prefix on value names. The .NET APIs follow this everywhere, from DayOfWeek to ConsoleColor.

// Don't
public enum PaymentMethodEnum { PaymentMethodCard, PaymentMethodPayPal }
public enum ECarrier { CarrierUps, CarrierFedEx }

// Do
public enum PaymentMethod { Card, PayPal }
public enum Carrier { Ups, FedEx }

You always type the enum name before a member, so PaymentMethod.PaymentMethodCard says it twice. The E prefix is a C++ habit; .NET doesn’t prefix type names.

Skip one-value enums and Reserved placeholder members too, since you can add values later. The guidelines also favor an enum over a set of static constants; C# constant naming conventions covers when constants still fit.

Why Not Use ALL_CAPS Enum Members in C#?

ALL_CAPS comes from C and Java. In C#, the member name is often what your users see, because ToString() and JSON serializers write the name. Line 1 below turns off the Native AOT default of file-based apps, which blocks reflection-based JSON:

#:property PublishAot=false
using System.Text.Json;
using System.Text.Json.Serialization;

var plain = new JsonSerializerOptions { Converters = { new JsonStringEnumConverter() } };
Console.WriteLine(JsonSerializer.Serialize(new OldShipment(1042, SHIP_SPEED.TWO_DAY), plain));
Console.WriteLine(JsonSerializer.Serialize(new Shipment(1042, ShipSpeed.TwoDay), plain));

var upper = new JsonSerializerOptions
{
    Converters = { new JsonStringEnumConverter(JsonNamingPolicy.SnakeCaseUpper) }
};
Console.WriteLine(JsonSerializer.Serialize(new Shipment(1042, ShipSpeed.TwoDay), upper));

enum SHIP_SPEED { GROUND, TWO_DAY, OVERNIGHT }
enum ShipSpeed { Ground, TwoDay, Overnight }
record OldShipment(int OrderId, SHIP_SPEED Speed);
record Shipment(int OrderId, ShipSpeed Speed);

Output:

{"OrderId":1042,"Speed":"TWO_DAY"}
{"OrderId":1042,"Speed":"TwoDay"}
{"OrderId":1042,"Speed":"TWO_DAY"}
C# enum ALL_CAPS SHIP_SPEED.TWO_DAY vs PascalCase ShipSpeed.TwoDay serialized to JSON with JsonStringEnumConverter and SnakeCaseUpper in VS Code
Member names leak into JSON; a naming policy gives you TWO_DAY without ALL_CAPS code

If an API really wants TWO_DAY, keep PascalCase in C# and pass JsonNamingPolicy.SnakeCaseUpper (.NET 8+) to the converter, as the third output line shows. More serializer options are in converting an object to JSON in C#.

Acronyms follow the usual .NET rule: two letters stay uppercase (IO), longer ones are PascalCase (Html).

Enum File Naming: Where Should an Enum Live?

Give each public enum its own file named after it: OrderStatus goes in OrderStatus.cs. A catch-all Enums.cs gets hard to search fast.

ShopEnums
├── Orders
│   ├── Order.cs
│   └── OrderStatus.cs
└── Shipping
    ├── DeliveryDays.cs
    └── ShipSpeed.cs

I keep each enum in its feature folder so the namespace in C# matches the path. Nest an enum in a class only when it’s private to that class.

How Do You Enforce C# Enum Naming with .editorconfig (IDE1006)?

Reviews miss things, so let the build check your enum names. You’ll need a project, not a file-based app (here’s how to create a console app in VS Code):

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
  </PropertyGroup>
</Project>

EnforceCodeStyleInBuild makes the build report IDE1006. The .editorconfig adds one naming rule for enum types and four analyzer rules:

root = true

[*.cs]
# Enum type names must be PascalCase (reported as IDE1006)
dotnet_naming_symbols.enum_types.applicable_kinds = enum
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_rule.enums_are_pascal_case.symbols = enum_types
dotnet_naming_rule.enums_are_pascal_case.style = pascal_case
dotnet_naming_rule.enums_are_pascal_case.severity = warning
dotnet_diagnostic.IDE1006.severity = warning

# .NET analyzer rules for enum names and values
# CA1008: zero value, CA1707: no underscores
dotnet_diagnostic.CA1008.severity = warning
dotnet_diagnostic.CA1707.severity = warning
# CA1711: no Enum/Flags suffix, CA1712: no type-name prefix on values
dotnet_diagnostic.CA1711.severity = warning
dotnet_diagnostic.CA1712.severity = warning

Program.cs just uses two of the enums:

using ShopEnums.Models;

Console.WriteLine($"{OrderStatusEnum.Shipped} via {Carrier.FED_EX}");

Models\Shipping.cs has five planted mistakes. I ran dotnet msbuild ShopEnums -t:Rebuild -restore -v:q -nologo -p:GenerateFullPaths=false, which prints each warning once; plain dotnet build reports the same ones:

namespace ShopEnums.Models;

public enum OrderStatusEnum { Pending, Shipped }

public enum PaymentMethod { PaymentMethodCard, PaymentMethodPayPal }

public enum shipSpeed { Ground, TwoDay }

public enum Carrier { Ups, FED_EX, Usps }

public enum ReturnReason { Damaged = 1, WrongSize = 2 }

Build output:

Models\Shipping.cs(3,13): warning CA1711: Rename type name OrderStatusEnum so that it does not end in 'Enum' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1711) [C:\DotNetDemo\EnumNamingDemo\ShopEnums\ShopEnums.csproj]
Models\Shipping.cs(5,29): warning CA1712: Do not prefix enum values with the name of the enum type 'PaymentMethod' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1712) [C:\DotNetDemo\EnumNamingDemo\ShopEnums\ShopEnums.csproj]
Models\Shipping.cs(5,48): warning CA1712: Do not prefix enum values with the name of the enum type 'PaymentMethod' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1712) [C:\DotNetDemo\EnumNamingDemo\ShopEnums\ShopEnums.csproj]
Models\Shipping.cs(7,13): warning IDE1006: Naming rule violation: These words must begin with upper case characters: shipSpeed (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide1006) [C:\DotNetDemo\EnumNamingDemo\ShopEnums\ShopEnums.csproj]
Models\Shipping.cs(11,13): warning CA1008: Add a member to ReturnReason that has a value of zero with a suggested name of 'None' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1008) [C:\DotNetDemo\EnumNamingDemo\ShopEnums\ShopEnums.csproj]
Models\Shipping.cs(9,28): warning CA1707: Remove the underscores from member name ShopEnums.Models.Carrier.FED_EX (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1707) [C:\DotNetDemo\EnumNamingDemo\ShopEnums\ShopEnums.csproj]
dotnet build output for C# enum naming rules: IDE1006 for shipSpeed, CA1711 Enum suffix, CA1712 type-name prefix, CA1707 underscore and CA1008 zero value
One build, five enum naming mistakes caught by IDE1006 and the CA naming rules

You get each mistake with its line and column: IDE1006 for shipSpeed, CA1711 for the suffix, CA1712 for the repeated type name, CA1707 for FED_EX and CA1008 for the missing zero.

Note: IDE1006 didn’t flag a camelCase enum member in my test, and CA1714 (plural flags names) reported nothing on .NET SDK 10.0.402. I still check member casing and singular vs. plural in review.

A few more naming guides from this series that pair well with enums:

Frequently Asked Questions

Should C# enum names be singular or plural?

Singular for a regular enum (OrderStatus), plural for an enum marked [Flags] (DeliveryDays), because a flags variable can hold several values at once.

Should enum values be uppercase in C#?

No. Enum members are PascalCase, like Shipped or TwoDay. If an API needs TWO_DAY in JSON, keep PascalCase in code and use JsonNamingPolicy.SnakeCaseUpper with JsonStringEnumConverter.

Is it OK to add an Enum suffix to an enum name?

No. The Framework Design Guidelines say not to use an Enum, Flag or Flags suffix, and analyzer rule CA1711 flags it. IntelliSense already shows that the type is an enum.

What should the zero value of an enum be called?

On a [Flags] enum, always None, meaning no flags are set. On a simple enum, use None or the most common default, because 0 is what an unassigned enum field holds.

Where does Microsoft document the enum naming rules?

In the Framework Design Guidelines on Microsoft Learn: see Names of Classes, Structs, and Interfaces, which has a section on naming enumerations.