String Enums

Is there any way to create a string enum instread of the default integer enum

For example change
Private Enum bcSet
bcDest = 0
bcSource = 1
End Enum

into

Private Enum bcSet
bcDest = "1"
bcSource = "2"
End Enum


Answer this question

String Enums

  • DLDeveloper

    you can use enum.GetName

  • Thona

    I've also see people using constants to simulate string enums:

    Class MyStrings
    Public Const APersonalName as String = "John"
    Public Const ALastName as String = "Smith"
    Public Const SaySomethingAnything as String = "42!"
    End Class

    Haven't dedicated much though to whether it's a good idea or not.



  • christian p

    Sorry string enum are not available

  • String Enums