// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Linq; namespace E { public class Program { public static void Main(string[] args) { string indexs = "a_4,a_14,k_9"; indexs = string.Join(",", indexs.Split(',').OrderByDescending(v => int.Parse(v.Substring(2))).ToArray()); Console.WriteLine(indexs); } } }