How to reverse the string in C#.

Amatya
Posted by Amatya under C# category on | Points: 40 | Views : 361
string Amatya = "Amatya";
string aytama = string.Empty;
foreach (char ch in Amatya)
{
aytama = ch + aytama;
}


The output will be -
aytamA

Thanks
Amatya

Comments or Responses

Login to post response