namespace demo_arraylist
{
class Program
{
static void Main(string[] args)
{
//Program that uses Array to Revers String
Console.WriteLine(StringHelper.RString("WELCOME"));
Console.WriteLine(StringHelper.RString("computer"));
Console.ReadKey();
}
//This is a method of Reverse string
static class StringHelper
{
/// Receives string and returns the string with its letters reversed.
public static string RString(string s)
{
char[] arr = s.ToCharArray();
Array.Reverse(arr);
return new string(arr);
}
}
}
}