When would you use an output parameter vs a return variable, or vice versa? In the following simple example, I can achieve the same thing using either one.
Using out
I will answer this question in different ways:
If you would like to return one value you have both the options. But if you would like to return multiple values you only need to stick with output parameters.
Second Scenario: In C# you have the control of type if you are using output parameters.
Third scenario: Function vs. Procedure select the one suiting to your needs.
Hope this helps