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...

Is string reference type / value type?

Answer Posted / djfox7200x

Strings are immutable.Hence they behave like a value type
when they are actually reference type;

eg. string objA="cat";
//cat is an immutable string in memory and objA points to
it.
string b=a; //reference is copied to b;

a="dog"; new immutable object created and a points to it;

//b is still cat since its refernce has not changed

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is int reference type c#?

1022


What is c sharp used for?

945


What is an expression in c#?

964


What is double c#?

986


What is decimal in c#?

969


What is the difference between decimal and integer?

1198


What is Assembly. and Describe type of assembly. why most developer happy with private assembly.

1031


How do you comment in c#?

1034


Is string a data type in c#?

887


What is a generic in c#?

969


Difference between type constructor and instance constructor? What is static constructor, when it will be fired? And what is its use?

1123


Why do we need serialization?

950


Explain what a diffgram, and a good use for one Define diffgram? How it be used?

1054


What is the difference between ienumerable and iqueryable?

1032


What is the property of a class in c#?

921