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 ByVal and ByRef?

Answer Posted / ashwini

When arguments are passed to a method ByVal i.e. By Value
then the original value of a variable is not passed but its
copy is created and that copy is passed. So whatever
changes are made, they will affect the copy but not the
original value of a variable.
When arguments are passed ByRef i.e. By Reference
then the argument's memory location is passed to a method.
So changes made to that argument's value will actually
affect the original value.

Is This Answer Correct ?    31 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use struct in c#?

1011


What's the difference between class and object?

1044


What's the difference between abstraction and encapsulation?

941


Is datetime a value type in c#?

929


Why do we use ienumerable in c#?

942


How do you set a class path?

925


What is private void in c#?

977


What are the different types of constructors in c#?

1177


How do I declare inout arguments in c#?

977


What is a namespace server?

965


What is iqueryable?

1006


How do I register my code for use by classic com clients?

930


When would you use generics in your code c#?

971


What is lastindexof c#?

917


How do I do implement a trace?

1162