"lianqtlit" <li*******@discussions.microsoft.comwrote in message
news:83**********************************@microsof t.com...
In performance wise which is more costly to use when there one value to
return?
Is it the out method parameter or the method that has a return value?
You should definitely not care about this, chances are that the method is
inlined, and if not, the (single) argument is passed in a register too.
Managed code uses the "CLR calling" convention when running on X86, that is,
it passes the first two arguments in a register. The 'this' pointer is
passed in 'ecx' while the "first" argument is passed in 'esi'. More, when
running on X64 in 64-bit mode, the first four arguments are passed in a
register, so here you have even less reasons to care about argument passing
efficiency.
Willy.