C
cody
Why isn't there an StringBuilder.Append() overload with a StringBuilder as
argument?
Is there a reason that I missed?
argument?
Is there a reason that I missed?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
...
stringBuilder2.Append(stringBuilder1.ToString());
...
I find no reason why one need such method.
Simon Svensson said:StringBuilder works internally with a large string, inserting data at an
incrementing position. For example, Append(bool value) calls return
this.Append(value.ToString()), where Append(string value) does the real
appending. Append(object value) works in the same way.
So if there would be a Append(StringBuilder value), it would internally
still call Append(value.ToString()), thus making it equal to call
Append(myStringBuilder.ToString()).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.