// 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.Collections.Generic; using System.Linq; namespace E { public class Program { private static readonly Random rng = new Random(); public static void Main(string[] args) { IList fleeces = new List() { "1s", "2s", "5s", "5r", "9s", "3s", "10s", "11s" }; string output = fleeces.OrderBy((s) => rng.Next()).Take(3).Aggregate((s1,s2) => s1 + "," + s2); Console.WriteLine(output); } } }