Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is the difference between “out” and “ref” parameters in C#?
Home
C Sharp
What is the difference between “out” and “ref” parameters in C#?
0
votes
asked
Oct 18, 2019
in
C Sharp
by
Robin
What is the difference between “out” and “ref” parameters in C#?
c#-out
c#-ref
out-c#
ref-c#
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 18, 2019
by
rajeshsharma
“out” parameter can be passed to a method and it need not be initialized where as “ref” parameter has to be initialized before it is used.
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
+1
vote
Q: What is the difference between ref & out parameters?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
0
votes
Q: List out the differences between Array and ArrayList in C#?
asked
Oct 18, 2019
in
C Sharp
by
Robin
array-in-c#
arraylist-in-c#
array-in-c-sharp
arraylist-in-c-sharp
c#-arraylist
c#-array
0
votes
Q: What is the difference between method overloading and method overriding in C#?
asked
May 6, 2020
in
C Sharp
by
SakshiSharma
#method-overloading
0
votes
Q: What is the difference between dispose() and finalize() methods in C#?
asked
May 6, 2020
in
C Sharp
by
SakshiSharma
#dispose
#finalize-method
+1
vote
Q: What is the difference between abstract class and interface in C#?
asked
May 6, 2020
in
C Sharp
by
SakshiSharma
#abstract-class
0
votes
Q: What is the difference between early binding and late binding in C#?
asked
May 6, 2020
in
C Sharp
by
SakshiSharma
#c-binding
#class-binding
0
votes
Q: What is the difference between a struct and a class in C#?
asked
Feb 16, 2020
in
C Sharp
by
rahuljain1
#c-sharp-struct
0
votes
Q: Explain difference between "continue" and "break" statements in C#?
asked
Feb 16, 2020
in
C Sharp
by
rahuljain1
#c#-continue
+1
vote
Q: Difference between String and StringBuilder in C#?
asked
Jan 20, 2020
in
C Sharp
by
AdilsonLima
0
votes
Q: What is the difference between “continue” and “break” statements in C#?
asked
Oct 18, 2019
in
C Sharp
by
Robin
continue-c#
break-c#
c#-break
c#-continue
...