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

Which types of inheritances does c# support?

466


what is main function of alternate teamplate of datalist?

1647


Can we inherit private class in c#?

498


What's different between c# and c/c++?

537


What is difference between C# and VB.NET?

516






How is lazy loading achieved?

499


Can an abstract class have a constructor c#?

493


Is c# an open source?

497


How do you declare an interface in c#?

488


What is assembly and dll in c#?

470


What is call back method?

520


What is the difference between array and arraylist c#?

468


Int map to which .net types?

543


Can you pass parameters to destructors?

532


What is difference between assembly and dll?

483