Search code examples
c#stringstringbuilder

StringBuilder: how to get the final String?


Someone told me that it's faster to concatenate strings with StringBuilder. I have changed my code but I do not see any Properties or Methods to get the final build string.

How can I get the string?


Solution

  • You can use .ToString() to get the String from the StringBuilder.