StringBuilder.Append : StringBuilder « System.Text « VB.Net by API






StringBuilder.Append

  
Imports System
Imports System.Text

Public Class MainClass

   Shared Sub Main()
      Dim objectValue As Object = "hello"
      Dim stringValue As String = "good bye"
      Dim characterArray As Char() = {"a"c, "b"c, "c"c, _
         "d"c, "e"c, "f"c}

      Dim booleanValue As Boolean = True
      Dim characterValue As Char = "Z"c
      Dim integerValue As Integer = 2347
      Dim longValue As Long = 100
      Dim singleValue As Single = 2.52
      Dim doubleValue As Double = 3.3
      Dim buffer As StringBuilder = New StringBuilder()

      ' use method Append to append values to buffer
      buffer.Append(objectValue)
      buffer.Append("  ")
      buffer.Append(stringValue)
      buffer.Append("  ")
      buffer.Append(characterArray)
      buffer.Append("  ")
      buffer.Append(characterArray, 0, 3)
      buffer.Append("  ")
      buffer.Append(booleanValue)
      buffer.Append("  ")
      buffer.Append(characterValue)
      buffer.Append("  ")
      buffer.Append(integerValue)
      buffer.Append("  ")
      buffer.Append(longValue)
      buffer.Append("  ")
      buffer.Append(singleValue)
      buffer.Append("  ")
      buffer.Append(doubleValue)

      Console.WriteLine("buffer = " & buffer.ToString())   
  End Sub ' Main

End Class

   
    
  








Related examples in the same category

1.StringBuilder.AppendFormat
2.StringBuilder.Chars
3.StringBuilder.EnsureCapacity
4.StringBuilder.Insert
5.StringBuilder.Replace