what is reference parameter?
what is out parameters?
what is difference these two?
Answer Posted / sarun p.t
out is used only to get output from a function.
it means that we cannot give any input using an out
parameter. Whatever value we assign to an out parameter
before calling to a function will be worthless, we need to
assign a value in the called function to our out parameter
before its first usage and if no usage we need to assign a
value before control leave the function.(out can be passed
to function while uninitialized)
ref parameter is used for both input and output. The only
thing is we need to assign a value before its first usage.
ref parameter must be initialized before passing to a
function.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Why do we need collections in c#?
What is the use of list in c#?
Can a class have more than 1 destructor?
Explain the security with aop?
What is the difference between User controls and Custom Controls?
Is java better than c sharp?
What is cosole application?
What is type cast in C#?
What is the difference between system.string and system.text.stringbuilder classes?
How does bubble sort work?
Which class does the remote object has to inherit?
What Is The Difference Between The System.array.copyto() And System.array.clone()?
How long will it take to learn c sharp?
Where is the keyword void used?
What is variable and its classification?