Programming Journal C#, Java, SQL and to a lesser extent HTML, CSS, XML, and regex. I made this so other programmers could benefit from my experience.

Monday, May 5, 2008

Resetting a StringBuilder

Here is how to reset a StringBuilder:

myStringBuilder.Length = 0;
myStringBuilder.Remove(0, myStringBuilder.Length) also works, but why bother with that one?

No comments: