Constant Shared array in vb.net Constant Shared array in vb.net arrays arrays

Constant Shared array in vb.net


I don't think it's possible. An alternative would be to use ReadOnly

Public Shared ReadOnly GX() As String = {"GS", "GP"}


Sadly, you are not able to use Arrays in constants...

See here for details...


You cannot use the Shared modifier in a Const Statement (Visual Basic), but constants are implicitly shared. Similarly, you cannot declare a member of a module or an interface to be Shared, but they are implicitly shared. Read this MSDN Document. You can not use shared and constant in same time