| title | How to: Create Strings Using a StringBuilder in Visual Basic | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 07/20/2015 | ||
| ms.prod | .net | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.topic | article | ||
| helpviewer_keywords |
|
||
| ms.assetid | 9c042880-aa16-432e-9ccb-cd00abda9ae3 | ||
| caps.latest.revision | 9 | ||
| author | dotnet-bot | ||
| ms.author | dotnetcontent |
This example constructs a long string from many smaller strings using the xref:System.Text.StringBuilder class. The xref:System.Text.StringBuilder class is more efficient than the &= operator for concatenating many strings.
The following example creates an instance of the xref:System.Text.StringBuilder class, appends 1,000 strings to that instance, and then returns its string representation.
[!code-vbVbVbalrStrings#70]
Using the StringBuilder Class
&= Operator
Strings
Creating New Strings
Manipulating Strings
Strings Sample