S
Sanjay Pais
I have a class:
public static class HOW_GOOD
{
static string[] mstrHowGood =
{
"A",
"G",
"NTB",
"T"
};
public static string AWESOME
{
get
{
return mstrHowGood[0];
}
}
public static string GREAT
{
get
{
return mstrHowGood[1];
}
}
public static string NOT_TOO_BAD
{
get
{
return mstrHowGood[2];
}
}
public static string TERRIBLE
{
get
{
return mstrHowGood[2];
}
}
}
But I get an error when I use it as a return type
HOW_GOOD': static types cannot be used as return types
I tried to do this
Public class MyClass
{
public HOW_GOOD HowAreYouDoing(string MyName)
{
return HOW_GOOD.NOT_TOO_BAD;
}
}
Is there any way around this? Is this the "imporper programming" ?
Thanks in advance
Sanjay
public static class HOW_GOOD
{
static string[] mstrHowGood =
{
"A",
"G",
"NTB",
"T"
};
public static string AWESOME
{
get
{
return mstrHowGood[0];
}
}
public static string GREAT
{
get
{
return mstrHowGood[1];
}
}
public static string NOT_TOO_BAD
{
get
{
return mstrHowGood[2];
}
}
public static string TERRIBLE
{
get
{
return mstrHowGood[2];
}
}
}
But I get an error when I use it as a return type
HOW_GOOD': static types cannot be used as return types
I tried to do this
Public class MyClass
{
public HOW_GOOD HowAreYouDoing(string MyName)
{
return HOW_GOOD.NOT_TOO_BAD;
}
}
Is there any way around this? Is this the "imporper programming" ?
Thanks in advance
Sanjay