I have an enum, which:
- is included in my class as a property
- it represents some values from a database table (a couple of types)
- it is displayed in DropBox, so that it can be used as a filter
Now I would like to add ‘All’ (or ‘None’ for example) value to this DropBox.
How should I do this:
- add ‘All’ value to Enum?
- add ‘All’ value to DropBox, change type of my property from Enum to String
- some other option…
Codesleuth comment on another answer made me read the question again and here is an update.
Consider the use of a flags enumeration if you are going to have multiple combination’s. In your case it would mean that selecting any combination of types is a valid input.
If the user can only select one type or all the types then use a normal enumeration: