S
Sanjay Pais
I know that string/char enum is not possible in c# (.NET2.0)
I need to create the equivalent of this:
public enum HOW_GOOD
{
AWESOME = "A",
GREAT= "G",
NOT_TOO_BAD = "N",
TERRIBLE="T"
}
i wanted to use this enum as a parameter/ return type for methods
Eg
public HOW_GOOD HowAreYouFeeling(string MyName)
{
return HOW_GOOD.NOT_TOO_BAD;
}
or
public string HowAreYouFeeling(HOW_GOOD m_HowGood)
{
return "Not Too Bad";
}
The rationale behind this is that this approach makes better readability for
the developers and makes my DBA happy as I will store only char values in
the DB. The dataset table results will have the char value too. However, if
I am forced to use enum's then the only alternative is numbers which are
really meaningless by themselves.
Thanks in advance
Sanjay
I need to create the equivalent of this:
public enum HOW_GOOD
{
AWESOME = "A",
GREAT= "G",
NOT_TOO_BAD = "N",
TERRIBLE="T"
}
i wanted to use this enum as a parameter/ return type for methods
Eg
public HOW_GOOD HowAreYouFeeling(string MyName)
{
return HOW_GOOD.NOT_TOO_BAD;
}
or
public string HowAreYouFeeling(HOW_GOOD m_HowGood)
{
return "Not Too Bad";
}
The rationale behind this is that this approach makes better readability for
the developers and makes my DBA happy as I will store only char values in
the DB. The dataset table results will have the char value too. However, if
I am forced to use enum's then the only alternative is numbers which are
really meaningless by themselves.
Thanks in advance
Sanjay