What's the use-case for this? I'm curious as to the requirements of your application that need this capability.
I don't see why you'd want to do this since Enums are really just symbolic constants for developers(that's why I'm asking). Even the .NET framework docs state: "Enums are used for "multiple choice" scenarios, in which a runtime decision is made from a fixed number of choices that are known at compile-time." --- Patrick Steele Microsoft .NET MVP http://weblogs.asp.net/psteele/ > -----Original Message----- > From: Unmoderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED] On Behalf Of Ben > Kloosterman > Sent: Tuesday, May 17, 2005 10:27 PM > To: [email protected] > Subject: Re: [ADVANCED-DOTNET] Enumerations > > > But can CodeDom extend existing code eg > > Add a color to the existing colors enumeration ( this is not > what I want to do just an example) > > Regards, > > Ben > > > -----Original Message----- > > From: Unmoderated discussion of advanced .NET topics. > [mailto:ADVANCED- > > [EMAIL PROTECTED] On Behalf Of Ali Khawaja > > Sent: Tuesday, 17 May 2005 4:22 PM > > To: [email protected] > > Subject: Re: [ADVANCED-DOTNET] Enumerations > > > > You can use CodeDOM to create, compile and use your > > own types at runtime.(and any other code that you > > want; essentially CodeDOM allows you to generate code) > > > > > > Ali > > > > > >From: Ben Kloosterman <[EMAIL PROTECTED]> > > > >Reply-To: "Unmoderated discussion of advanced .NET > > > topics." > > > ><[email protected]> > > > >To: [email protected] > > > >Subject: [ADVANCED-DOTNET] Enumerations > > > >Date: Tue, 17 May 2005 14:08:11 +1000 > > > > > > > >Hi All , > > > > > > > >Is there any way of extending an existing > > > enumeration with new fields at > > > >run time using Reflection ? I have used > > > enumbuilder to create a new > > > >enum but what I really want is to modify an > > > existing enumerations at run > > > >time . By adding additional entries from an Xml > > > file or table . =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
