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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of line styles available in Treeview Control?

2443


What is "Reserved Error -1209"?

2086


What is the use of Immediate, Local Window?

2040


Why does everybody say I should save in TEXT not BINARY?

1624


How should dates be implemented so they work with other language and country formats?

1425


How many ways we can access file using VB?

2039


Write the steps in Creating ActiveX Dll and Active Exe?

2074


How can I call a 'hidden' DOS program from VB?

1488


What is the use of Visual Basic Document file?

2828


Advantage of ActiveX Dll over Active Exe.

2056


Which method is preferred to save datas like database?

1982


How do I force a file dialogue box to reread the currect disk?

1445


____ property is used to lock a textbox to enter a datas.

1630


What is the difference between Msgbox Statement and MsgboxQ function?

1952


Which property of textbox cannot be changed at runtime. What is the max size of textbox?

1036