Sarbeswar Sahoo
what is output parameters?
By Sarbeswar Sahoo in C# on Jan 24 2017
  • Sarbeswar Sahoo
    Jan, 2017 24

    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.

    • 4
  • Harish Supekar
    Jul, 2017 14

    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.

    • 3
  • Sridhar Sharma
    Mar, 2017 8

    If you want your function to return more than one value then we use out parameters.

    • 2
  • kalpesh purohit
    Nov, 2022 2

    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

    • 1
  • Suresh Kumar
    Oct, 2017 28

    use out parameter if your function want to return more than one value

    • 1
  • manju Paul
    Sep, 2017 28

    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.

    • 0
  • Thenmozhi Elangovan
    Sep, 2017 13

    It is useful, when you need to return values from a method through the parameters without assigning an initial value to the parameters.

    • 0
  • Mukesh Kumar
    Aug, 2017 28

    output parameters returns the values

    • 0
  • Adi Srivastava
    Aug, 2017 1

    In c# when you use out parameters data passed in an unidirectional way.

    • 0
  • sushil kumar
    Jul, 2017 14

    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.

    • 0
  • Karthick R
    May, 2017 27

    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.

    • 0
  • Alok Tripathi
    Mar, 2017 29

    Output parameters are used to receive the data the from any method.

    • 0
  • shweta singh
    Mar, 2017 15

    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.

    • 0
  • Naveen Bisht
    Feb, 2017 16

    it is used to passed argument by refrence, it is best purpose is if you want 2 return values form function.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS