What is the appropriate way to set a VB StringBuilder to an empty string?
Posted
by Wayne Werner
on Stack Overflow
See other posts from Stack Overflow
or by Wayne Werner
Published on 2010-05-19T15:06:37Z
Indexed on
2010/05/19
15:10 UTC
Read the original article
Hit count: 250
I'm using VB's StringBuilder, and I was curious what is considered "best practice" for emptying the builder/setting it to a new string. Would it be something like this:
Dim str As New System.Text.StringBuilder()
str.Append("Some string to remove")
str = new System.Text.StringBuilder()
str.Append("Ahh, fresh new text!")
or is there a "Better" way?
Thanks
© Stack Overflow or respective owner