Jump to content
Sign in to follow this  
Roland S.

Best case using ByRef

Recommended Posts

Roland S.

Hello Forum,

i have some stupid question: When is the best case to use the keyword ByRef for variables?

Becaus i am not shure every time, i have to ask this question to all the people here.



Share this post

Link to post
Share on other sites

it's used in function parametres

1) when you need change value of parameter inside func and return this changed value back through th

at parameter variable2

2) when you pass array as function parameter - in this case there isn't done copy of all array to local variable --> this is for speed optimalization

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.