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 |
What is CCW (COM Callable Wrapper)
When developing a Windows service for .NET, which namespace do you typically look in for required classes?
Is there any thread in our .net programs?
State the methods used during deserialization and serialization process.
What is a garbage collector?
Explain what does managed mean in the .net context?
Explain the difference between garbage collections in .net 4.0 and earlier versions?
What is a manifest in .net?
Describe the Managed Execution Process?
What is Meta Data? Explain Types of Assemblies
.What is Marshaling?
asp mean