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 Garbage Collection in .Net?

1033


Why delegates are type safe?

911


Define an escape sequence, name few strings in escape sequence?

932


Explain About multi level and multiple inheritance how to achieve in .net

1028


code for arranging given number in possible permutation ways ex:123,321,312,132,231,213.

2166


What is the delegates in c#?

908


Why do we need reflection in c#?

910


What are the extension methods in c#?

909


Is c# good for beginners?

889


Why hashtable is thread safe in c#?

1000


Explain About .NET Remoting and types of remoting

1071


Wht executescaler method is used?

957


Explain About Virtual functions and their use.

1018


What is an array class?

1098


What is public or shared assemblies ?

1010