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

List the difference between the virtual method and the abstract method?

0 Answers  


1)what is difference between char and varchar in sql server 2005 2) what is composite key and candidate key 3) what is temporary table and derived table 4) how to calculate difference between two dates

1 Answers   Wipro,


What is a delegate?

5 Answers   Siebel Systems,


Is typeof c#?

0 Answers  


What is the correct way of declaring an xml namespace?

0 Answers  






What do you mean by for each loop?

0 Answers  


Explain the difference between the system.array.copyto() and system.array.clone()?

0 Answers  


What is a long in c#?

0 Answers  


What is dictionary collection in c#?

0 Answers  


Why generics are used in c#?

0 Answers  


What is call back method?

0 Answers  


How to store image file in Sql server database?

4 Answers   Unique Software Systems,


Categories