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
Which namespace is used to support multithearding in .NET?
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
Name the classes that are introduced in the system.numerics namespace.
Explain the differences between server-side code and client-side code.
Explain how to load the contents of an xml file into an xmldocument object?
What are the new features in .net core?
Explain garbage collection?
Write the .net syntax for 'for loop'?
What is the difference between override and overload in a method?
Is .net core free?
Which namespace does it belong to by default?
What is the concept of inheritance in .net?
What is meant by globalization?
Why inheritance is important?
What is a variable of implicit type and what is its scope?