The code would potentially be very simple and require very little
maintenance ...If possible...  It does not have to be enumerations after
all enumerations have been around for years in C varients (though
slightly different) .  A class with constants would achieve a similar
result. 

Besides the strong typing it introduces would save many errors you get
from untyped data.  

Over the years I have seen so many errors from DataSet["Untyped"] string
or untyped SQL that I think it is worth a look into ..  For single value
lookups .  
        
Ben 


> -----Original Message-----
> From: Unmoderated discussion of advanced .NET topics.
[mailto:ADVANCED-
> [EMAIL PROTECTED] On Behalf Of Peter Ritchie
> Sent: Wednesday, 18 May 2005 9:05 PM
> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
> Subject: Re: [ADVANCED-DOTNET] Enumerations
> 
> Seems to me this is what variables are for.
> 
> Sounds like it's just a case of "the language supports it, so I need
to
> implement it that way".
> 
> I've seen alot of code over the years that was overly complex and used
all
> the little-known features of the language, or used them in a new and
> strange
> way.  All of that code was buggy and extremely hard to maintain.
Usually
> anyone using the latest language features, or using very strange
aspects
> of
> the language doesn't stick around to maintain the code; so, it usually
> just
> gets dropped.
> 
> I would suggest not using enumerations in this way.
> 
> http://www.peterRitchie.com/
> 
> On Wed, 18 May 2005 12:52:07 +1000, 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: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
> >> 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."
> >>
> 
> ===================================
> 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

Reply via email to