Link to home
Start Free TrialLog in
Avatar of mathieu_cupryk
mathieu_cuprykFlag for Canada

asked on

Need to create an enum type for three different environments.

public enum Environment
    {
        test   = "System Integration Testing",
        accept = "Client Acceptance Testing",
        prod   = "Production",
    }
When the user comes back a string how should I assign a label the value of for example
test
It should say System Integration Testing.
Avatar of oxyoo
oxyoo
Flag of Sweden image

Hi,

There is a useful blog post on the subject here..
http://blogs.msdn.com/abhinaba/archive/2005/10/20/483000.aspx

Good Luck!
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mathieu_cupryk

ASKER

how can i get the environment from the connection string.
if I have
SCWB2.WPG.CWB.CA
UCWB2.WPG.CWB.CA
first character.
S--> System Integration Testing.
U--> Client Acceptance Testing.

  <add name="InitialPriceReporting.Properties.Settings.ConnectionString" connectionString="Data Source=SCWB2.wpg.cwb.ca;Persist Security Info=True;User ID=init_price;Password=init_77day;Unicode=True" providerName="System.Data.OracleClient"/>
 
Need to get it from the name
Hi, you should post a new question for this, the solution is not simple, you have to make some pasing tasks.