What’s the difference between System.String and
System.Text.StringBuilder classes with example
Answer Posted / puneet mishra
according to me difference between a string class and using String Builder is that in using a string class you need to create new object befour appending it to the main string but in string builder class one don`t need to create object every time
Example for string builder class:
using System.Text;
stringBuilder str = new stringBuilder;
str.append("");
in the previous example once u create str as new instance of string builder class u just have to append every thing in to the string
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is garbage collection? How to force garbage collector to run?
Explain the accessibility modifier protected internal?
In c#, what will happen if you do not explicitly provide a constructor for a class?
What is the difference between CreateObject() and GetObject()?
How are delegates chosen?
What are the 3 different types of arrays?
What is difference between internal and protected internal in c#?
How do you specify a custom attribute for the entire assembly (rather than for a class)?
What is unsigned int?
What are the advantages of clr procedure over t-sql procedure?
Can you inherit multiple abstract classes in c#?
Which class does the remote object has to inherit?
What is boxing and unboxing in c#?
What do you mean by string objects are immutable?
What is out int in c#?