Collection of Enum with additional properties

  • Thread starter Thread starter Donal McWeeney
  • Start date Start date
D

Donal McWeeney

Just thinking out loud here and looking for feedback in case I missed
something...

I was to track some additional properties around an enum I have - for
example a display name and a description. So I was thinking a building a
class EnumDescriptor to store these properties - and make it generic so that
it could be used for all enums.

I also need to be able to store and manage a collection of these
EnumDescriptor objects... for this I was thinking of building a custom
collection class (EnumDescriptorCollection) by inheriting from the the
NameObjectCollectionBase class.

Anybody know if I missed something in the .net framework that may do the
above for me?
Or if I missed anything in the logic...

Thanks

Donal
 
True... the only drawback to this is that enum has too much free
functionality with it to ignore it.

Thanks

Donal


chornbe said:
Would your own custom attribute classes work better for you in place of an
enum, then collect them in a standard dictionary?
 
Back
Top