C# function normal return value VS out or ref argument
Posted
by misha-r
on Stack Overflow
See other posts from Stack Overflow
or by misha-r
Published on 2010-05-16T07:22:34Z
Indexed on
2010/05/16
7:30 UTC
Read the original article
Hit count: 314
Hi People,
I've got a method in c# that needs to return a very large array (or any other large data structure for that matter).
Is there a performance gain in using a ref or out parameter instead of the standard return value?
I.e. is there any performance or other gain in using
void function(sometype input, ref largearray)
over
largearray function(sometype input)
?
Thanks in advance!
© Stack Overflow or respective owner