This Code sort chars in a CharArray
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
char[] array = { 'y', 'a', 'c', 'e','x' }; // Input
Array.Sort<char>(array);
// Call sort.
foreach (var c in array)
{
Console.WriteLine(c);
}
}
}
}
Kommentare zum Snippet