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 dto c#?

841


if we are updating a database using thread, and mean while application crashes or thread being aborted then what will happen in Database? Rollback or Database will be updated? Please explain with different scenario.

2354


Does c# replace c++?

985


What is the difference between and xml documentation tag?

903


4. Describe the process when we send a request URL? And who is responsible for that?

1929


How many types of constructors are available in c#?

993


How jit (just in time) works?

900


What is difference between ilist and list?

848


What is the main purpose of xml?

873


Does c# support #define for defining global constants?

973


What is the use of xmlserializer?

816


What is multidimensional array in c#?

878


How does dependency injection work c#?

877


Why do we use overloading in c#?

927


What is the difference between a field and a property in c#?

880