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
What are pdbs?
How to spawn a thread?
Explain is the jit an interpreter?
Explain why do we use the “using” statement?
Does .net supports destructors concept?
How anonymous method is different from a lambda expression?
What is the difference between "using system.data;" and directly adding the reference from "add references dialog box"?
Tell me about secure socket layer? How to make use of the technology?
Please explain what is the difference between constants and read-only variables?
I'm having some trouble with cas. How can I troubleshoot the problem?
Tell me what is a “jagged array”?
How will you register com+ services?
How to prepare parametrized (with more than one parameters) crystal report. Please tell me the code procedure, if any body can?
What are the challenging issues you have faced in implementation project/Maintainance project in .net Functionality? How you have overcome that issue?
How does cas works?