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

Can arraylist store different data types in c#?

0 Answers  


Why do we need encapsulation in c#?

0 Answers  


What standard types does c# use?

0 Answers  


Is post back c#?

0 Answers  


Are multiple data types stored in System.Array?

0 Answers   Siebel,






What is the process of delegation?

0 Answers  


what is IComparable

0 Answers   Wipro,


C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?

3 Answers   Visual Soft,


Is an interface a type c#?

0 Answers  


How do I run managed code in a process?

0 Answers  


Explain constructor in c#?

1 Answers  


Why do we need dependency injection in c#?

0 Answers  


Categories