Hi,
For objects (that is, reference types) ByVal means that the function being
called cannot overwrite the *reference* to the object instance which is
actually passed in the parameter variable. But it does not prevent the
callee to alter properties on the instance.
ByRef, on the other hand, enables the callee to overwrite the reference
itself and therefore substitute the original object instance with another
one.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"Goncalo" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Hi.
Can you tell me what's the difference between ByVal and
ByRef in VB.Net.
I'm asking this 'cause i'm passing an object into a
function ByVal, then I change that object and when the
function terminates the original object is changed.
This kind of output is usual when passing objects ByRef,
right?
Thank's in advance
Goncalo