GeekInterview.com
Series: Subject: Topic:
Question: 3 of 467

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.
Asked by: Mark Haynes | Member Since Sep-2011 | Asked on: Sep 27th, 2011

View all questions by Mark Haynes   View all 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.

  
Login to rate this answer.

Is there ever an exception to that defination, that when using ByVal you pass only the value and the variable can not be chnaged by the calling structure?

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.