"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Loading...

Thursday, March 17, 2005

Reference Relevance

As seen in an email list for dotnet programming...

Passing a reference type by value lets the callee manipulate the object that is referenced. Passing a reference type by reference lets the callee manipulate the reference to the object itself - to change where the caller's reference points.
Such are the things one gets to sweat about when the language is not as simple as possible.

Yeah, I know.

And ouch...

One thing to keep in mind when is that the 'ref' is very important when you cross application boundaries. Specifically this applies to .NET Remoting. If a parameter is labeled with 'ref' it will copy the changes back to the caller. This differs significantly from calling a member function locally.

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.