Link to home
Start Free TrialLog in
Avatar of Flora Edwards
Flora EdwardsFlag for Sweden

asked on

By Ref and ByVal explained in plain examples

Hello,

i really need to learn what is the difference between ByRef and ByVal , and how they are used and when should we use ByRef and when should we use ByVal.

i would appreciate if someone can explain with a simple examples.

thanks.
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Good to read

Passing Arguments by Value and by Reference (Visual Basic)
https://msdn.microsoft.com/en-us/library/ddck1z30.aspx
ASKER CERTIFIED SOLUTION
Avatar of [ fanpages ]
[ fanpages ]

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
also for references

How to: Protect a Procedure Argument Against Value Changes (Visual Basic)
https://msdn.microsoft.com/en-us/library/xw55ed62.aspx

How to: Change the Value of a Procedure Argument (Visual Basic)
https://msdn.microsoft.com/en-us/library/6zxyfyzz.aspx

How to: Force an Argument to Be Passed by Value (Visual Basic)
https://msdn.microsoft.com/en-us/library/chy4288y.aspx

look for the links on the left hand side.
Avatar of Flora Edwards

ASKER

thanks very much fanpages.  very well explained.
thank you Ryan Chong as well.
you're welcome Flora, you can get further details from the links I had provided. cheers...