Method Output Parameter vs Return Value 
Author Message
 Method Output Parameter vs Return Value

What is the difference between

   void Foo (out int outputValue)
    {
    }

and

   int Foo (int inputValue)
    {
      int outputValue = inputValue
      return outputValue
    }



Sat, 16 Apr 2005 23:58:57 GMT  
 Method Output Parameter vs Return Value

Quote:

> What is the difference between

>    void Foo (out int outputValue)
>     {
>     }

> and

>    int Foo (int inputValue)
>     {
>       int outputValue = inputValue
>       return outputValue
>     }

See http://www.pobox.com/~skeet/CSharp/parameters.html

--
Jon Skeet

If replying to the group, please do not mail me at the same time



Sun, 17 Apr 2005 02:06:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Generic object as method parameter / return value?

2. Returning error values vs. not returning

3. CRecordset doesn't return output string parameters (MFC 4.2)

4. how to return BSTR* values as [out, retval] parameter

5. function parameters and return values aren't changed by function call

6. How to return from method without value?

7. Using enum as a return value in a custom [local] interface method

8. IDL Methods returning values

9. Server calling client method and return values

10. Newbie ATL Question : Adding methods that return values to VB

11. Return values from controls methods

12. template template parameter with default value (VS.NET 2003)

 

 
Powered by phpBB® Forum Software