Created
August 13, 2016 00:31
-
-
Save ezesundayeze/0201d99d2e2c29af280fa01519f53d71 to your computer and use it in GitHub Desktop.
A Simple Method To Reverse Any String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void reverse(){ | |
char[] reverse = txt1.Text.ToCharArray(); // put all the characters in a character Array! | |
Array.Reverse(reverse); | |
txt1.Text = new string(reverse); | |
// this three lines of code will reverse any string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment