|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
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. |
#2
| |||
| |||
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() { } } |
#3
| |||
| |||
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; } |
![]() |
|
Tags: programming application, return type, static type |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convert reference types in value type and vice versa | Terawa | Software Development | 3 | 13-02-2011 07:41 AM |
what are the possible return types of a main method? | \"Dritan\" | Software Development | 3 | 08-01-2011 03:50 AM |
Implement the return type in java | Captain Carrot | Software Development | 4 | 25-03-2010 01:34 PM |
Method with multiple return types | ISAIAH | Software Development | 5 | 25-02-2010 05:10 AM |
ArrayList and type the return | manjava | Software Development | 2 | 09-05-2009 11:15 PM |