i see this Question
best-way-to-clear-contents-of-nets-stringbuilder/
the answerers set the length to zero and also worries about capacity ? does it really matter to set capacity ?
f we dis-assemble .net 4.5 Library , navigate to System.Text.StringBuilder
/// <summary>
/// Removes all characters from the current
<see cref="T:System.Text.StringBuilder"/> instance.
/// </summary>
///
/// <returns>
/// An object whose <see cref="P:System.Text.StringBuilder.Length"/>
/// is 0 (zero).
/// </returns>
[__DynamicallyInvokable]
public StringBuilder Clear()
{
this.Length = 0;
return this;
}
is it really matters to set capacity when we already set its length to zero... or ms doesn't care that?