// 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; namespace E { public class Program { private static Random rng = new Random(); public static void Main(string[] args) { string s = "Hello world !"; char[] c = s.ToCharArray(); byte[] b = new byte[c.Length]; rng.NextBytes(b); Array.Sort(b, c); string s2 = new string(c); Console.WriteLine(s2); } } }