It is not important that out parameter use to return two value for a function or method in simple words we can say it use to return value
Interviews14 answers
what is output parameters?
14 Answers
kalpesh purohitPosted Nov 2, 2022, 6:04 AM EDT
use out parameter if your function want to return more than one value
Suresh KumarPosted Oct 28, 2017, 7:17 AM EDT
A parameter declared with an out modifier is an output parameter. Similar to a reference parameter, an output parameter does not create a new storage location. Instead, an output parameter represents the same storage location as the variable given as the argument in the method invocation.
manju PaulPosted Sep 28, 2017, 11:40 AM EDT
It is useful, when you need to return values from a method through the parameters without assigning an initial value to the parameters.
Thenmozhi ElangovanPosted Sep 13, 2017, 4:09 AM EDT
output parameters returns the values
Mukesh KumarPosted Aug 28, 2017, 5:27 AM EDT
In c# when you use out parameters data passed in an unidirectional way.
Adi SrivastavaPosted Jul 31, 2017, 11:56 PM EDT
A method is returning only one value. if you want to return more than one value from method then you can use either out or ref parameter. it is not necessary to initialize the value at declare time. so you can just pass the parameter in the method and after some manipulation , out param value will change after called method.
sushil kumarPosted Jul 14, 2017, 9:10 AM EDT
In C#,It's a method parameter. Specially used for returning multiple values from method. And variables passed as out arguments do not have to be initialized at the time of calling that method but It must be initialized within that function body.
Harish SupekarPosted Jul 14, 2017, 3:20 AM EDT
Every output parameter of a method must be definitely assigned before the method returns. Output parameters are typically used in methods that produce multiple return values.
Karthick RPosted May 27, 2017, 12:18 AM EDT
Output parameters are used to receive the data the from any method.
Alok TripathiPosted Mar 28, 2017, 11:51 PM EDT
Output parameters are used when you want to return multiple values from a function. Normally you can return only one value but defining multiple out parameters in your arguments defines how many values you can return...for example three out parameters in arguments means you can return three values from a function. Those are also not necessary to be initialized before like how we have to do for ref parameters.
shweta singhPosted Mar 15, 2017, 2:21 AM EDT
If you want your function to return more than one value then we use out parameters.
Sridhar SharmaPosted Mar 8, 2017, 4:18 PM EST
it is used to passed argument by refrence, it is best purpose is if you want 2 return values form function.
Naveen BishtPosted Feb 16, 2017, 5:41 PM EST
A return statement can be used for returning only one value from a function. you can return two values from a function. Output parameters are similar to reference parameters, except that they transfer data out of the method rather than into it.
Sarbeswar SahooPosted Jan 23, 2017, 11:53 PM EST







