Imports System
public class Test
public Shared Sub Main
Dim data As String = "abcdefgh"
Dim objSB As New Text.StringBuilder
Dim intLength As Integer = Len(data)
Dim intChar As Integer
Dim chr As Char
Dim objTS As TimeSpan
Dim dteStart As Date
objSB.Capacity = intLength
objSB.Append(data)
dteStart = Now()
For intChar = 0 To CInt(objSB.Length / 2 - 1)
chr = objSB.Chars(intChar)
objSB.Chars(intChar) = objSB.Chars(intLength - intChar - 1)
objSB.Chars(intLength - intChar - 1) = chr
Next
objTS = Now().Subtract(dteStart)
Console.WriteLine(objTS.ToString)
Console.WriteLine(objSB.ToString)
End Sub
End class
00:00:00
hgfedcba