I need to define enum attributes with variable. This will work fine :
Public Enum CommandsC_e
    <Title("Cmd1")>
    CommandC1
    <Title("Cmd2")>
    CommandC2
End Enum
But this code give me a "constant expression is required." error :
Dim Title as string = "Test"
Public Enum CommandsC_e
    <Title(Title)>
    CommandC1
    <Title("Cmd2")>
    CommandC2
End Enum
I have read somewhere that the enum attributes need to be known at compilation time. Is there a workaround for that ?