Say I have some constants that depends on one another, and I decided to keep them together in a container instead of keeping it as individual constants in a class.
I thought use a Structure
for that scope, but the compiler forces me to declare a private member for that structure.
' Compile error: at least one private member is needed.
Private Structure BandSizes
Const BandHeight As Short = HourHeight + 20
Const HourHeight As Short = HalfHourHeight + 20
Const HalfHourHeight As Short = LineHeight + PictureHeight + 20
Const PictureHeight As Short = 20
Const LineHeight As Short = StopHeight + 10
Const LineWidth As Short = 50
Const StopHeight As Short = 30
End Structure
As I have only a few integer constants, should I create a shared (static) class?
Platform: VB.NET (.NET 2)