Here is an example of using StringBuilder:
Import System.Text
Imports System.Text
Example using Append method.
Dim dString As New StringBuilder dString.Append("This is a string. ") dString.Append("This is another string.")
The output of this will be: "This is a string. This is another string."
Example using AppendFormat method
Dim dString As New StringBuilder Dim dString1 As String = "Append" Dim dString2 As String = "Format" dString.AppendFormat("This is a string using {0}{1},", dString1, dString2)
No comments:
Post a Comment