Is string a value type or a reference type?
Answers were Sorted based on User's Feedback
Answer / 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 |
Difference between class and interface in .net?
State the differences between the dispose() and finalize().
What is a garbage collector?
for the textbox if i want to allow only numbers.what ever the characters u enter it should not take.which event u used?
What is the managed and unmanaged code in .net?
What is Application Domain?
Describe the start-up process for a Windows service.
How many namespaces are in .net version 1.1?
Explain about managed heap?
Without UDDI, is it possible to access a remote web service ?
1 Answers RR, TCS, Tech Mahindra,
What is dot net architecture?
What's the use of system.diagnostics.process class in .net?