using System;
public class Program
{
public static void Main()
string str ="Hello World";
int lastIndex = str.Length - 1;
char[] chars = str.ToCharArray();
for(int i=0;i<lastIndex;i++,lastIndex--)
var temp = chars[i];
chars[i] = chars[lastIndex];
chars[lastIndex]=temp;
}
str = string.Concat(chars);
Console.WriteLine(str);