"UJ" <fr**@nowhere.com> wrote in message
news:O3**************@TK2MSFTNGP14.phx.gbl...
Is there a way to get the number of items that are in an enum? I'm trying
to find out how many items there are so that I can hit every one of them
to test.
TIA - Jeff.
Enum.GetNames/GetValues is necessary as everyone hs said but might not be
sufficient because:
1) Duplicate values are allowed. This isn't really a problem but you might
want to weed out duplicate values.
2) The enum might have the FlagsAttribute in which case you need to OR
together all possible combinations.