E
Elad Gutman
Hello,
Something is quite puzzled to me in using the 'ref' keyword, probably
due to some lack of basic understanding.
Whenever I wanna change the parameter passed to a function I will use
the 'ref' keyword, that's fine, and it even makes sense when sending a
Value Type parameter (int, float or a struct, for example). However, if
I'm sending a class object to the function, and this object is a
Reference Type, of course, isn't it being sent Byref as a default
behavior because it's a Reference value??? When sending a Reference
Type to a function is it being sent Byval and therefore I have to use
the 'ref' keyword?
What am I missing here?
Thanks,
Elad
Something is quite puzzled to me in using the 'ref' keyword, probably
due to some lack of basic understanding.
Whenever I wanna change the parameter passed to a function I will use
the 'ref' keyword, that's fine, and it even makes sense when sending a
Value Type parameter (int, float or a struct, for example). However, if
I'm sending a class object to the function, and this object is a
Reference Type, of course, isn't it being sent Byref as a default
behavior because it's a Reference value??? When sending a Reference
Type to a function is it being sent Byval and therefore I have to use
the 'ref' keyword?
What am I missing here?
Thanks,
Elad