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

Different between method overriding and method overloading?

0 Answers  


What do you mean by streamreader/streamwriter class in c#?

0 Answers  


What does the parameter Initial Catalog define inside Connection String?

5 Answers  


Is boxing an implicit conversion?

0 Answers  


Can we have only “try” block without “catch” block in c#?

0 Answers  


How can you use abstract class and interface?

0 Answers   Accenture,


What is the difference between static class and sealed class in c#?

0 Answers  


What is the major difference between a custom control and user control?

0 Answers   C DAC, CDAC,


Explain the types of comments in c#?

0 Answers  


What does this keyword mean in c#?

0 Answers  


What is array class in c#?

0 Answers  


Explain namespaces in c#.

0 Answers  


Categories