reverse of a string without using reverse function?

Kmandapalli
Posted by Kmandapalli under VB.NET category on | Points: 40 | Views : 752
Class ReverseString
Public Shared Sub Main(args As String())
Dim Name As String = "Welcome to dotnet funda."
Dim characters As Char() = Name.ToCharArray()
Dim sb As New StringBuilder()
For i As Integer = Name.Length - 1 To 0 Step -1
sb.Append(characters(i))
Next
Console.Write(sb.ToString())
Console.Read()
End Sub
End Class

Comments or Responses

Login to post response