Mega Code Archive

 
Categories / VB.Net Tutorial / Data Type
 

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 [Object] = 0       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 [Decimal] = 5       Dim xSingle As Single = 6.6F       Dim xDouble As Double = 7.7       Dim xUInt16 As System.UInt16 = 8        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, 1, 2)       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