.NET Framework 4.0 Newbie : StringBuilder.New

.NET Framework 4.0 Newbie : StringBuilder.New

  • Comments 0

In .NET Framework 4.0 we have an option to clear StringBuilder class. Unlike previous versions where we used to write StringBuilder.Length = 0 to clean, now we can implement a new method called Clear().


var sBulder = new StringBuilder();



sBulder.Append("Again another");


//Previous approach to clear up StringBuilder

sBulder.Length = 0;


//New approach to clean string builder





Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post