Reversing a string

Get the characters from a string with ToCharArray() method, then use the Array.Reverse() method to reverse characters, and create a new string using the reversed char array.

string s1;
s1 =
"0123456789";
char[] chars;
chars = s1.ToCharArray();
Array.Reverse(chars);
string s2 = new string(chars);
Console.WriteLine(s2);

Türkçe'si için tiklayin.