Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
i have a bunch of constants that i need to access all the time and i want to access it like mData.constantA . What is the best way to do it? I tried making a Structure Data.
but then it say Structure Data must contain at least one instance member variable or Event declaration. So i added a useless
And its working. What would be a better way to do this?
VB.NET:
Dim mData as Data
Structure Data
Public ReadOnly Property constantA() As Integer
Get
Return 123
End Get
End Property
Public ReadOnly Property constantB() As Integer
Get
Return 234
End Get
End Property
End Structure
VB.NET:
Public abc As Integer
Last edited: