Static types can we used as return type
I have some programming code applied in my order management system, I used some of the static methods in it, which is expecting return value from the method, but i am not able to understand whether should we use static method as return type. please correct if i am wrong.
Re: Static types can we used as return type
As per my knowledge you cannot make your method return type with the static method, this is no allowed. you may check from here:
Code:
class VirtualGrid<T>
where T : ModelGenericBase<T> {
void test() {
//'T' is a 'type parameter', which is not valid in the given context
T.test1();
}
}
class ModelGenericBase<T> {
public static void test1() {
}
}
Re: Static types can we used as return type
The point of a static class is that there are no instances of it -you therefore could never have a variable of that type which had any value other than null.
In your code, you have:
public HOW_GOOD HowAreYouDoing(string MyName)
{
return HOW_GOOD.NOT_TOO_BAD;
}