c# how do i re-initialize qBuilder01 of type StringBuilder?

how do i re-initialize qBuilder01 of type StringBuilder?
 initially i declared StringBuilder qBuilder01 = new StringBuilder().
qBuilder01.Append(xNode.InnerText);
command.CommandText = qBuilder01.ToString();
..................

i want to re-use qBuilder01after i am done with first query.

thanks
jgordinAsked:
Who is Participating?
 
tpwellsCommented:
qBuilder01.Remove(0, qBuilder01.Length)

Will remove everything from the builder and have it ready for more.
0
 
active_agentCommented:
qBuilder01.Length = 0

Will clear the StringBuilder.

0
 
Bob LearnedCommented:
Just create a new StringBuilder:

qBuilder01 = new StringBuilder();

Bob
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.