What is meant by ByVal and ByRef?

In passing variables to procedures and fuctions, what is meant by "ByVal" and "ByRef"? Is there ever an exception to the standard definition for these?
This is a question you will most likely get in any Visual Basic interview.

Questions by Mark Haynes   answers by Mark Haynes

Showing Answers 1 - 2 of 2 Answers

When using byval, you pass the argument's value. When using byref, you pass the argument by reference. If you pass by value, the variable can not be changed by the calling structure. If you use byref, the variable can be changed by the calling structure.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions