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

What is the advantage of generics in c#?

911


Can we have static indexer in c#?

916


How do I create a multilanguage?

924


What does ienumerable mean?

916


What is difference between internal and protected internal in c#?

946


What is the advantage of constructor?

907


What method is used to sort the elements of the array in descending order?

960


How is method overriding different from overloading?

1050


What is the difference between “dispose” and “finalize” variables in c#?

1011


What is the function of the not null constraint?

950


Is c sharp and c# are same?

935


How to override a function in c#?

1010


Is c# or c++ better for games?

855


Why do we use class in c#?

930


Can we have multiple threads in one app domain?

951