.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

How to reverse a string in .NET

Posted By:ASPEvil       Posted Date: November 15, 2010    Points: 50    Category: ASP.NET    URL: http://www.dotnetspark.com  

This code snippet shows how to reverse a string in DotNet using the most simple way

There are situations when we need to reverse a particular string, specially when we do work with string. So I did mention the easiest way to do that in VB.Net and in C#.Net, as follow:-

VB.Net code:-
TextBox2.Text = StrReverse(TextBox1.Text)

C#.Net code:-
TextBox2.Text == Strings.StrReverse(TextBox1.Text)

Note: In both the cases above, I am reversing a string which is in a textbox control namely, TextBox1 and getting this reversed string to an another textbox contol namely, TextBox2
 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend