What’s the difference between System.String and
System.Text.StringBuilder classes with example

Answers were Sorted based on User's Feedback



What’s the difference between System.String and System.Text.StringBuilder classes with example..

Answer / sudha

System.string works on copy of string data.
System.Text.StringBuilder works on actuval string data

Is This Answer Correct ?    9 Yes 2 No

What’s the difference between System.String and System.Text.StringBuilder classes with example..

Answer / 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

More C Sharp Interview Questions

Explain the 3 types of properties in c# with an example?

0 Answers  


What are the valid parameter types we can pass in an Indexer ?

3 Answers   CMC,


directcast(123.34,integer) - should it throw an error? Why or why not?

2 Answers   Wipro,


Why is it a bad idea to throw your own exceptions?

4 Answers  


Why we use anonymous methods in c#?

0 Answers  






What is an escape sequence?

0 Answers  


Explain inheritance in c#?

0 Answers  


Which controls do not have events?

0 Answers  


What is list collection in c#?

0 Answers  


what is c# command?

0 Answers  


what is the index value of the first element in an array?

0 Answers  


What does string intern do?

0 Answers  


Categories