What is the Main difference between String and
StringBuilder and why do we use StringBuilder.

Answer Posted / dinesh sharma

String bulider Can Be Used When More Than One String Can we
concatenated.
StringBuilder which is more efficient because it does
contain a mutable string buffer. .NET Strings are immutable
which is the reason why a new string object is created
every time we alter it (insert, append, remove, etc.).

StringBulider Is more Effiecent Then String B'Cuse It
Provide Some Standered Function like Append,Reverse,Remove
etc.

Is This Answer Correct ?    179 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between a method and a procedure?

722


What is Covariance and contravariance in C#?

788


What is the difference between “out” and “ref” parameters in c#?

745


What is int64 in c#?

708


Can we instantiate abstract class in c#?

691


How do you prevent a class from being inherited?

741


What is a custom attribute?

680


How to Install uninstall assemblies into GAC?

716


What is expression tree in c#?

715


What is icollection in c#?

728


what is the difference between a struct and a class in c#?

831


What is c sharp language?

737


What are the uses of delegates in c#?

832


Why do we need a singleton class?

746


What is inheritance c#?

708