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 are the different states of a thread?

922


What is delegates in c#?

895


What is Garbage Collection in .Net?

1034


If you donot specify an access modifier for a method, what is the default access modifier?

1033


Explain manifest in c#.

947


Why do we use 0?

922


What does type safety mean?

1062


Which attribute adorn a test class to be picked up by the NUnit GUI in the NUnit test framework?

983


What are the properties of c#?

987


Illustrate race condition?

905


Why do we use lambda expression in c#?

936


What is the use of expression tree in c#?

867


How do you use nullable?

946


Is list immutable in c#?

869


What is a must for multitasking

1000