C
cs
What's picturebox?
Reading MSDN, there is a function call defined as:
FunctionName(ref count)
What does "ref" here indicate?
Reading MSDN, there is a function call defined as:
FunctionName(ref count)
What does "ref" here indicate?
cs said:FunctionName(ref count)
What does "ref" here indicate?
Reference instead of By Value. In the case of reference types, theThe ref keyword indicates that you need to your parameter By
Jeff said:Frank... Hmm. If you write a swap routine, by ref works and by value
does not. So I am not sure the difference is just academic.
you are referring to.<You're going to have to provide an example as I do not understand what
Frank Oquendo said:You're going to have to provide an example as I do not understand what
you are referring to. When passing a reference type ByVal, only the
handle to the object is duplicated and passed. You're still manipulating
the original object. That sounds pretty academic to me.
ByRef and ByVal only have meaningful semantics when passing value types.
Jon said:Not true at all. Simple example:
Frank Oquendo said:A conveniently simple example, at that. What you've demonstrated is that
you can chang what the copy of an object handle points to without
effecting the original object.
However, that behavior changes as soon as
you manipulate an object's properties, quite in contradiction to what
quite a few people would expect.