Is there a way when using and enumerated field in a class, to restrict the values of the property to only the ones enumerated? For example...
What if I try to enter 5, which is not one of the choices? Will VB allow me to enter 5 or will it say 5 is not a valid value for the property? I want to disallow values that are not listed.Code:Enum AttendanceNotes Present = 0 Tardy = 1 Absent = 2 SchoolTrip = 4 ResourceLab = 8 End Enum




Reply With Quote