Demonstrating StringBuilder class constructors : StringBuilder « Language Basics « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Database ADO.net
6.Development
7.Event
8.File Directory
9.Generics
10.GUI
11.Language Basics
12.LINQ
13.Network Remote
14.Thread
15.Windows System
16.XML
17.XML LINQ
VB.Net Tutorial
VB.Net by API
VB.Net » Language Basics » StringBuilderScreenshots 
Demonstrating StringBuilder class constructors
Demonstrating StringBuilder class constructors

Imports System
Imports System.Text

Public Class MainClass

   Shared Sub Main()


      Dim buffer1, buffer2, buffer3 As StringBuilder
      Dim quotes As Char = ChrW(34)

      buffer1 = New StringBuilder()
      buffer2 = New StringBuilder(10)
      buffer3 = New StringBuilder("hello")

      Console.WriteLine("buffer1 = " & quotes & buffer1.ToString() & _
         quotes)

      Console.WriteLine("buffer2 = " & quotes & _
         buffer2.ToString() & quotes)

      Console.WriteLine("buffer3 = " & quotes & _
         buffer3.ToString() & quotes)
   End Sub ' Main

End Class


           
       
Related examples in the same category
1.Use StringBuilder for fast processing stringsUse StringBuilder for fast processing strings
2.StringBuilder Performance Test
3.StringBuilder: Char and ReplaceStringBuilder: Char and Replace
4.StringBuilder Length and CapacityStringBuilder Length and Capacity
5.Use StringBuilder IndexerUse StringBuilder Indexer
6.StringBuilder Append methodsStringBuilder Append methods
7.StringBuilder method AppendFormatStringBuilder method AppendFormat
8.Insert and Remove of the StringBuilder classInsert and Remove of the StringBuilder class
9.StringBuilder Replace methodStringBuilder Replace method
10.Append String to StringBuilderAppend String to StringBuilder
w_w__w__._j___a_va2s_._c__o___m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.