Reverse a string in c#

Function to reverse a string given below:

static public string Reverse( string s )
{
char[] charArray = s.ToCharArray();//array declaration
    Array.Reverse( charArray );reversing string and Array is Class or pre defined class
    return new string( charArray );
}

this allow user to reverse a string or a entered string
Ebook Download
View all
Learn
View all