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
How to find methods of a assembly file (not using ILDASM)?
What is the use of ispostback in c#?
Explain About friend and Protected friend
How does one compare strings in c#?
what are the differences between a class and structure
What is constructors, explain with syntax
What is the major difference between a custom control and user control?
What is native image generator (ngen.exe)?
To whom a method is accesssed if it is marked as protected internal ?
what class is underneath the sortedlist class?
What is the syntax for calling an overloaded constructor within a constructor (this() and constructorname() does not compile)?
Define constructor in c#.
What is expression tree with example?
Why do we need oops in c#?
What is the name of c# compiler?