- hello
Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
ASP.NET: Reverse a string
From Wiki
Summary: Reverse a string
Here's a couple of simple methods you can use to reverse a string:
- Partial Class Default1
- Inherits System.Web.UI.Page
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Response.Write(ReverseString("olleh"))
- End Sub
- Public Function ReverseString(ByVal targetString As String) As String
- Dim Characters() As Char = targetString.ToCharArray
- Array.Reverse(Characters)
- Return Characters
- End Function
- Private Function ReverseString2(ByVal targetString As String) As String
- Return StrReverse(targetString)
- End Function
- End Class
Output:
This Hack is part of the ASP.NET Hacks collection



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.