Manu
What’s the advantage of using System.Text.StringBuilder over System.String?
By Manu in C# on Jul 12 2006
  • Mukesh Kumar
    Jun, 2017 27

    by the use of System.Text.stringBuilder we can save memory wastage & time Wastage let we use string without stringBuilder &perform concatenation in loop. for all concatenations objects are created after concatenation buffer are destroyed so we need large memory & time so we use StringBuilder rather than String

    • 0
  • Mukesh Kumar
    Jun, 2017 27

    by the use of System.Text.stringBuilder we can save memory wastage & time Wastage let we use string without stringBuilder &perform concatenation in loop. for all concatenations objects are created after concatenation buffer are destroyed so we need large memory & time so we use StringBuilder rather than String

    • 0
  • smruti padhy
    Nov, 2016 28

    Basically, use a string builder if you plan on doing a lot of concatenation operations. It will save you some time and memory when executing (which is especially handy if you run that code snippet a lot, or if you are running on a web server, for instance).

    • 0
  • Manu
    Jul, 2006 12

    StringBuilder is more efficient in the cases, where a lot of manipulation is done to the text. Strings are immutable, so each time it’s being operated on, a new instance is created.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS