Pass By Reference Question

W

wackyphill

When you pass a built in type like an int to another function by
reference is boxing occuring?

ex:

main()
{

}
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

When you pass a built in type like an int to another function by
reference is boxing occuring?

ex:

main()
{

}

What are you passing?
 
W

wackyphill

Thanks for the link.

OK, so I believe that it says passing a value type (int) by reference
gives the called method access to the value-type variable directly,
and boxing is not occuring.

Correct?
 
M

Mattias Sjögren

OK, so I believe that it says passing a value type (int) by reference
gives the called method access to the value-type variable directly,
and boxing is not occuring.

Correct?

Correct.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top