Insert method of StringBuilder : StringBuilder « Data Type « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Data Type » StringBuilder 
2.40.8.Insert method of StringBuilder
Imports System
Imports System.Text

Class Sample
   Private Shared sb As StringBuilder

   Public Shared Sub Main()
      Dim xyz As String = "xyz"
      Dim abc As Char() =  {"a"c, "b"c, "c"c}
      Dim star As Char = "*"c
      Dim obj As [Object0

      Dim xBool As Boolean = True
      Dim xByte As Byte = 1
      Dim xInt16 As Short = 2
      Dim xInt32 As Integer = 3
      Dim xInt64 As Long = 4
      Dim xDecimal As [Decimal5
      Dim xSingle As Single = 6.6F
      Dim xDouble As Double = 7.7

      Dim xUInt16 As System.UInt16 = 
      Dim xUInt32 As System.UInt32 = 9
      Dim xUInt64 As System.UInt64 = 10 
      Dim xSByte As System.SByte = - 11
      
      sb = New StringBuilder()

      sb.Insert(3, xyz, 2)
      sb.Insert(3, xyz)
      sb.Insert(3, star)
      sb.Insert(3, abc)
      sb.Insert(3, abc, 12)
      sb.Insert(3, xBool)    
      sb.Insert(3, obj)      
      sb.Insert(3, xByte)     
      sb.Insert(3, xInt16)    
      sb.Insert(3, xInt32)    
      sb.Insert(3, xInt64)    
      sb.Insert(3, xDecimal)  
      sb.Insert(3, xSingle)   
      sb.Insert(3, xDouble)   
      sb.Insert(3, xUInt16
      sb.Insert(3, xUInt32
      sb.Insert(3, xUInt64
      sb.Insert(3, xSByte)  

      Console.WriteLine(sb.ToString())

   End Sub 
End Class
2.40.StringBuilder
2.40.1.Demonstrating StringBuilder class constructors
2.40.2.StringBuilder: Insert string, Append and Replace
2.40.3.Append Char to StringBuilder
2.40.4.Demonstrating StringBuilder Append methods
2.40.5.StringBuilder AppendFormat
2.40.6.StringBuilder.AppendFormat: {0:D} is ${1: #,###.00}
2.40.7.Replace method.
2.40.8.Insert method of StringBuilder
2.40.9.StringBuilder: Length, Capacity, EnsureCapacity
2.40.10.Use StringBuilder Indexer
2.40.11.Demonstrating methods Insert and Remove of the StringBuilder class
2.40.12.Demonstrating method Replace
2.40.13.Use StringBuilder to reverse a string
2.40.14.StringBuilder.ToStrings
2.40.15.Performance difference between String and StringBuilder
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.