T
tinman
Hi...
I'd like to some feedback as to how best to approach Enums.
For example:
Assume a staffing application which has the following enum for Project
Types:
Public Enum enmProjectType
ptDepartmental
ptDivisional
ptGeographical
End Enum
If we were to take this approach, then all is fine if the enumeration stays
the same (in an ideal world). However, in the real world, there might be
new additions to the enumeration. For example, there might now be a
ptNational - a new member of the enmProjectType.
The way I see it - the ONLY way to make the change is to modify the
enum in the source code and re-compile.
My question: how can we achieve this without compilation. Should we not use
enums at all and use, maybe, strings (taken from a combobox perhaps)
instead?
Meaning, we store these values (Departmental, Divisional etc...) in the
database
instead as enums in the code.
Cheers!
I'd like to some feedback as to how best to approach Enums.
For example:
Assume a staffing application which has the following enum for Project
Types:
Public Enum enmProjectType
ptDepartmental
ptDivisional
ptGeographical
End Enum
If we were to take this approach, then all is fine if the enumeration stays
the same (in an ideal world). However, in the real world, there might be
new additions to the enumeration. For example, there might now be a
ptNational - a new member of the enmProjectType.
The way I see it - the ONLY way to make the change is to modify the
enum in the source code and re-compile.
My question: how can we achieve this without compilation. Should we not use
enums at all and use, maybe, strings (taken from a combobox perhaps)
instead?
Meaning, we store these values (Departmental, Divisional etc...) in the
database
instead as enums in the code.
Cheers!