例一:
using System;
using System.Collections.Generic;
using System.Text;
namespace testa
{
class Program
{
static void Main(string[] args)
{
string a= Console.ReadLine().ToString();
char[] arr = a.ToCharArray();
Array.Reverse(arr );
foreach (char i in arr)
{
Console.Write(i);
}
Console .Read ();
}
}
}
例二:
using System;
using System.Collections.Generic;
using System.Text;
namespace test1
{
class Program
{
static void Main(string[] args)
{
string d = "abcdef";
char[] g = d.ToCharArray();
Array.Reverse(g);
Console.Write(g);
}
}
}