Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Posts Tagged ‘stringbuilder

Ways to clear stringbuilder in C#

with 2 comments

There are no clear method straightaway to clear the string stored in stringbuilder class.

So there are alternatives to do that.


or you can do the below also

string strObject= sbObject.ToString();

But Microsoft people woken up and put the Clear() function in .NET 4.0 🙂

Written by Manish

February 6, 2010 at 11:08 am

Posted in .NET

Tagged with , ,