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

What is protected internal modifier in C#?

1052


What is a dbml?

906


What is class in oops with example in c#?

924


What is a dll in c#?

912


What is clr namespace?

1040


Which operator cannot be overloaded in c sharp?

876


What are the delegates in c#?

951


Explain about CTS?

961


Why do we need collections in c#?

870


what are the contents of an assembly ?

993


What is dataset and dataadapter in c#?

939


What is oledbconnection c#?

925


What's the c# syntax to catch any possible exception?

1066


How does insertion sort work?

924


if a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

1065