C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
iOS
Java
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
29
Reply
what is output parameters?
Sarbeswar Sahoo
8y
2.4k
1
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
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 Sahoo
8y
4
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 Supekar
8y
3
If you want your function to return more than one value then we use out parameters.
Sridhar Sharma
8y
2
use out parameter if your function want to return more than one value
Suresh Kumar
8y
0
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 Paul
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
Out is used to return value
Mukesh Kumar
8y
0
It is useful, when you need to return values from a method through the parameters without assigning an initial value to the parameters.
Thenmozhi Elangovan
8y
0
Out parameters returns the values
Mukesh Kumar
8y
0
output parameters returns the values
Mukesh Kumar
8y
0
In c# when you use out parameters data passed in an unidirectional way.
Adi Srivastava
8y
0
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 kumar
8y
0
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 R
8y
0
Output parameters are used to receive the data the from any method.
Alok Tripathi
8y
0
Output parameters are used to receive the data the from any method.
Alok Tripathi
8y
0
Output parameters are used to receive the data the from any method.
Alok Tripathi
8y
0
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 singh
8y
0
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 singh
8y
0
it is used to passed argument by refrence, it is best purpose is if you want 2 return values form function.
Naveen Bisht
8y
0
it is used to passed argument by refrence, it is best purpose is if you want 2 return values form function.
Naveen Bisht
8y
0
Message