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

Last Reply 11 months ago By Mudassar

Posted 11 months 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")>
        CLI
        <Description("Called number")>
        DNIS
        <Description("PID entered by caller")>
        PID
        <Description("PID + confirmation to caller")>
        PID+
        <Description("Channel number")>
        CHNL

    End Enum

The value PID+ is giving me error .

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

 

 

 

Posted 11 months ago Modified on 11 months ago

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