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 passing a value object by
reference and a reference object by value?

Answer Posted / ashish diwakar

Value Objects are the objects that contain the data as
objects such int, string, etc...
Reference Objects are the objects that contain the data as
reference such as StringBuilder,etc...

When a Value object is passed as reference the reference of
the object is passed to the method (which means that any
change made to variable will be reflected on the original
variable).
But when a Reference Object is passed by value Like :
StringBuilder sb =new StringBuilder();

sb.Append("hello");

Display(sb);

any change made on sb inside Display function will not
change value of sb.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between finally and finalize block?

898


What is the difference between values and reference types?

945


Why can’t struct be used instead of class for storing entity?

904


Explain the access modifiers in c#?

891


What is AutoMapper in C#?

959


What is type keyword in c#?

883


What is platform independence"?

903


What is the use of functional interface?

872


What language is c# similar to?

880


Is for loop faster than foreach?

958


What is the difference between list and arraylist in c#?

819


What is option parameter in C#?

932


What is the extension of c# file?

933


What is ildasm.exe used for?

975


What is the difference between convert and parse in c#?

885