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 |
How viewstate is being formed and how it is stored on client in .net?
How many types of design patterns available in .NET?
Define satelite assembly?
What are the improvements made in cas in .net 4.0?
With these events, why wouldn't microsoft combine invalidate and paint, so that you wouldn't have to tell it to repaint, and then to force it to repaint?
Explain what is an application domain?
Can a try block have more than one catch block?
One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid this problem?
Tell me what is a “jagged array”?
differance between checkbox and rediobutton in vb.net?
for the textbox if i want to allow only numbers.what ever the characters u enter it should not take.which event u used?
explain the states of a window service application?