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 |
Name for built-in permission sets in .Net
What are the contents of assembly?
What is Entity Relationship Model in .NET?
What are the different parts of an Assembly in .Net?
What is lambda expressions in c#?
what is the difference between early binding and late binding in .net?
Who is using .net core?
Explain soap and xml?
What is CCW (COM Callable Wrapper) ?
Explain boxing and unboxing in .net.
syntax for binding the data from database
How do you create threading in.net?