Ways to clear stringbuilder in C#
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🙂