why not store them in a db table and allow the user to modify/add as necessary?
use xml file to load the necessary values? --- Ben Kloosterman <[EMAIL PROTECTED]> wrote: > In most apps I have a number of enumerations which > are used in business > logic .ie if ( job.State == Accepted) or if (service > == > SpecialAirDelivery). Though these change rarely > often I am forced to > use a class and a table to handle these rare changes > , or have to > compile a new app . > > What I would like to do is have a simple table which > can be used to > extend a number of enumerations which can be changed > on the live system. > > > I suppose I could use a class with constants, to do > the same . Is it > possible to extend this . > > > Regards , > > Ben > > > > > -----Original Message----- > > From: Unmoderated discussion of advanced .NET > topics. > [mailto:ADVANCED- > > [EMAIL PROTECTED] On Behalf Of Patrick > Steele > > Sent: Wednesday, 18 May 2005 12:34 PM > > To: [email protected] > > Subject: Re: [ADVANCED-DOTNET] Enumerations > > > > 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(r) > http://www.develop.com > > > > View archives and manage your subscription(s) at > > http://discuss.develop.com > > =================================== > This list is hosted by DevelopMentor� > http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > =================================== This list is hosted by DevelopMentor� http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
