Mega Code Archive

 
Categories / VB.Net Tutorial / Data Type
 

Loop through characters in string and display reversed

Module Tester    Sub Main()       Dim string1 As String       Dim characterArray As Char()       Dim i As Integer       Dim quotes As Char = ChrW(34)       string1 = "hello there"       characterArray = New Char(5) {}       For i = string1.Length - 1 To 0 Step -1          Console.WriteLine(string1.Chars(i))       Next    End Sub ' Main End Module e r e h t o l e h