I'm finding this in some legacy code and just curious what the brackets are for?
Public Enum myEnum
none = 0
abc = 2
def = 4
ghi= 6
[jkl] = 8
mno = 9
End Enum
I'm finding this in some legacy code and just curious what the brackets are for?
Public Enum myEnum
none = 0
abc = 2
def = 4
ghi= 6
[jkl] = 8
mno = 9
End Enum
Brackets are usually used when you want to use a keyword for a variable, classname, function name, or something else where using a keyword would usually be not allowed. Here is a list of the vb.net keywords.
They're not needed in the example you provided, which I assume you have obscured, but the brackets let you specify a name for an enum item that would otherwise conflict with a reserved word.