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 a value type or a reference type?

Answer Posted / rajneesh hajela

string is immutable

but stringbuildler are mutable...

this play many role


StringBuilder y = new StringBuilder();
y.Append("hello");

StringBuilder x = new StringBuilder();
x.Append("hello");

if (y == x)
{
}
// Stirng is immutable .In some ways it to
be value types .These are known as immutable .
//===================

string str1 = "hello";
string str2 = "hello";

if (str1 == str2)
{
}
//===============
string y1 ="";
y1="hello";

Program p = new Program();
p.foo(ref y1);
Console.WriteLine(y1);

}

void foo(ref string sb)
{
sb="Rajneesh Hajela:";
}


Rajneesh Hajela

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pdbs?

1087


How to spawn a thread?

1034


Explain is the jit an interpreter?

1048


Explain why do we use the “using” statement?

1049


Does .net supports destructors concept?

2072


How anonymous method is different from a lambda expression?

1008


What is the difference between "using system.data;" and directly adding the reference from "add references dialog box"?

1144


Tell me about secure socket layer? How to make use of the technology?

983


Please explain what is the difference between constants and read-only variables?

1132


I'm having some trouble with cas. How can I troubleshoot the problem?

1016


Tell me what is a “jagged array”?

1045


How will you register com+ services?

2052


How to prepare parametrized (with more than one parameters) crystal report. Please tell me the code procedure, if any body can?

966


What are the challenging issues you have faced in implementation project/Maintainance project in .net Functionality? How you have overcome that issue?

5125


How does cas works?

998