String inverse

in #ita2 months ago

using System;

public static class ReverseString

{

public static string Reverse(string input)

{

    char [] cArray = input.ToCharArray();

    string reverse = String.Empty;

    for (int i = input.Length - 1; i >= 0; i--)

    {

        reverse += cArray[i];

    }

    return reverse;

}

}