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...

What is the difference between ByRef and ByVal.
When to use ByRef and ByVal

Answer Posted / manjunathareddy

ByVal :- Byval is address the actual value of the variable.

Ex:- Function abc(Byval var)
var=var+1
End Function

Dim x:x=2
abc x
Msgbox x

In Above example 2 is the Actual value so it address the
actual value,the Result is 2.

ByRef:- ByRef is address the Location of the Stored variable.

Function abc(ByRef var)
var=var+1
End Function

Dim x:x=2
abc x
Msgbox x

In above example it 2 actual value but in byref it refers
the location of the stored variable the result is 3.

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention when to use function procedures and what are its characteristics?

1075


give me any information abou vb script books learn quckly

2122


How to assign a numeric value to a variable?

1082


Mention how to create a cookie using vbscript?

959


Explain different types of segment?

989


who will create the object?

1928


Why to use option explicit in vb script?

1016


Explain sga memory structures?

985


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

2954


did any one attended interview in applabs if you had gone through plz tell me the procedure

2225


what is the differance between BYVAL,BYREF?

2233


How will you format a number in percetage format in vbscript?

949


What is the purpose of folders object of scripting.filesystemobject class in vbscript?

1332


how to acces the remote mechine using vb cript(QTP)

1991


Explain vbscript in detail?

1016