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

How do you serialize an object?

0 Answers  


Why generics are used in c#?

0 Answers  


what is the need of using interface in program ex:if we have a program like this interface1() { void method1(); void method(); } class a1 : interface1 { a1 b = new b(); b.method1(); b.method2(); } so without using interface also we can achieve this then wat is the need to use the interface? plz give me the answer

1 Answers  


Why data types are important?

0 Answers  


What is collection of classes in c#?

0 Answers  






can any one send the project manager questions in .net

1 Answers  


Is c# or c++ better for games?

0 Answers  


Explain how to implement an object pool in c#.net

0 Answers  


Why do we still see so much non-oo code written in c# today?

0 Answers  


Can abstract class have parameterized constructor?

0 Answers  


Is c# difficult to learn?

0 Answers  


Why is it called c sharp?

0 Answers  


Categories