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
What is difference between array and list?
What is a verbatim string literal and why do we use it?
What is default c#?
What is difference between comparable and comparator?
In .NET how can you solve the DLL Hell problem?
What are tuples c#?
How is a string immutable?
What does private void mean in c#?
Difference between a sub and a function in c#.
What Is The Smallest Unit Of Execution In .net?
How is the syntax written to inherit from a class in C#?Give an example ?
What is mvc in c#?
What is the difference between final finally and finalize in c#?
What is a bool in c#?
How do switch statements work?