Enumeration (Enum): Unable to use special characters like Plus sign in C#

Last Reply one year ago By Mudassar

Posted one year ago

when i create the enumeration in my class file it shows a blue underline saying end of statement expected.

Are you able to create the enumeration i sent in your visual studio class file?

only for PID+ line there is an error becuase of the plus sign.

  Public Enum IdentificationType
        <Description("Calling line identification")>
        <Description("Called number")>
        <Description("PID entered by caller")>
        <Description("PID + confirmation to caller")>
        <Description("Channel number")>

    End Enum

The value PID+ is giving me error .

How can i add a value with a + sign..




Posted one year ago Modified on one year ago

I already told you not possible. + sign is a operator and hence cannot be used. Rename it as PID_Plus.