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 view model in c#?

835


What is the difference between C# 3.5 and C# 4.0?

930


Which of these statements correctly declares a two-dimensional array in c#?

1048


What is use of FormBoarderStyle Propertie

914


Explain About disco and uddi

1115


Can a struct have a default constructor (a constructor without parameters) or a destructor in c#?

958


What is private static in c#?

904


Which one is trusted and which one is untrusted?

920


What are sessions in c#?

929


In .NET which is the smallest unit of execution?

1046


What are Types of assemblies that can be created in dotnet

1022


What is the difference while using directive vs using statement ?

995


How does one compare strings in c#?

997


What are the namespace level elements?

964


You are creating a custom usercontrol, some of the newly created properties are shown in the properties window. How you can hide a new property named theme from the properties window?

916