Is is allowed to have an Enum member name that start with a number?

I am trying to set up an enum to hold sheet metal gauges (thicknesses). I thought it would be most intuitive if I could write:

using System.ComponentModel;
public enum Gauge
{
    [Description("24 Gauge")]
    24Ga = 239,
    [Description("20 Gauge")]
    20Ga = 359,
    [Description("18 Gauge")]
    18Ga = 478,
    [Description("16 Gauge")]
    16Ga = 598,
    [Description("14 Gauge")]
    14Ga = 747
}

but this is rejected by Visual Studio.

Instead this is OK:

using System.ComponentModel;
public enum Gauge
{
    [Description("24 Gauge")]
    G24 = 239,
    [Description("20 Gauge")]
    G20 = 359,
    [Description("18 Gauge")]
    G18 = 478,
    [Description("16 Gauge")]
    G16 = 598,
    [Description("14 Gauge")]
    G14 = 747
}

This makes it seem pretty obvious that you are not allowed to start a Enum member name off with a numeric character, even though that is usually allowed for variable names.

My question is: Where is this restriction specified? The Enum Class documentation does not seem to mention it.

Jon Skeet
people
quotationmark

No. Enum members have to be valid identifiers. From section 14.3 of the C# 5 specification:

The body of an enum type declaration defines zero or more enum members, which are the named constants of the enum type. No two enum members can have the same name.

enum-member-declarations:
enum-member-declaration
enum-member-declarations , enum-member-declaration
enum-member-declaration:
attributesopt identifier
attributesopt identifier = constant-expression

... and identifiers are described in section 2.4.2:

identifier:
available-identifier
@identifier-or-keyword
available-identifier:
An identifier-or-keyword that is not a keyword
identifier-or-keyword:
identifier-start-character identifier-part-charactersopt
identifier-start-character:
letter-character
_ (the underscore character U+005F)

Note how a digit is not an identifier-start-character.

people

See more on this question at Stackoverflow