Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the terminology?
Message
From
16/06/2010 09:19:16
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
16/06/2010 09:07:05
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01469189
Message ID:
01469195
Views:
62
>>>Hi,
>>>
>>>my mind has gone blank this morning trying to remember the name of the coding structure that lets you define constants and let your code use them like a pick list.
>>>
>>>For example, I want to define a list like this:
>>>
>>>1 - Pending
>>>2 - In Force
>>>3 - Deferred
>>>4 - Matured
>>>and so on.
>>>
>>>Then when I refer to this structure while writing my code it is easy to see which number corresponds to which term.
>>>
>>>What I am looking for is an easy way to define the current status of an item and make it easy for this status to be translated to other languages. Is this the best way to achieve this?
>>
>>Enumerations.
>
>Thanks Mike!
>
>Do you think this is the best way to achieve this? Or can you suggest alternatives? Maybe I should just use a table with values so that they can be translated if needed?

I do this all the time. I use NHibernate which can map the enumeration directly to a table field.
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform