CCCPaste

Reversing String in C#

using System;

public class ArrayToString {


public static void Main(string[] args) {
string program = "The quick brown fox jumped over the lazy dog";
char[] arr = program.ToCharArray(); // convert program string to char array
Array.Reverse(arr); // reverse array
string result = new string(arr); // create instance of string class

Console.Write(result);


}
}