Skip to content

Instantly share code, notes, and snippets.

@jarehec
Last active December 3, 2016 05:15
Show Gist options
  • Save jarehec/21ef4c7de279b06921105fdc150bccea to your computer and use it in GitHub Desktop.
Save jarehec/21ef4c7de279b06921105fdc150bccea to your computer and use it in GitHub Desktop.
using System;
using System.Linq;
namespace sort
{
class Program
{
static void Main(string[] args)
{
string line = "this,will,be,sorted,alphabetically";
string[] words = line.Split(',').ToArray();
Array.Sort(words);
foreach (string item in words)
{
Console.Write(item + ", ");
}
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment