Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Difference between ByRef and ByVal?



Difference between ByRef and ByVal?..

Answer / suresh

Only a copy of a variable is passed when an argument is
passed by value. If the procedure changes the value, the
change affects only the copy and not the variable itself.
Use the ByVal keyword to indicate an argument passed by
value.

Passing arguments by reference gives the procedure access
to the a1ctual variable contents in its memory address
location. As a result, the variable's value can be
permanently changed by the procedure to which it is passed.
Passing by reference is the default in Visual Basic.
If you specify a data type for an argument passed by
reference, you must pass a value of that type for the
argument. You can work around this by passing an
expression, rather than a data type, for an argument.
Visual Basic evaluates an expression and passes it as the
required type if it can.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More Visual Basic Interview Questions

what is the Difference between Declaration and Instantiation an object?

1 Answers  


what are the differences between image and picture controls?

3 Answers  


What is "Reserved Error -1209"?

0 Answers  


What are the new events in textbox that has been included in VB6.0

1 Answers  


What is the use of stretch property in Image control?

1 Answers  


How would you access objects created in ActiveX Exe and ActiveX Dll

0 Answers  


what are container objects?

1 Answers  


What is Friend Variable?

1 Answers  


How can I access a record by record number?

0 Answers  


Give brief description about class?

0 Answers  


What are the Sequence of events when a form is loaded in Visual Basic?

6 Answers  


Types of ActiveX Components in VB?

0 Answers  


Categories