rss
twitter
facebook

Home

Radom Colours

        public void MssRandomColour(out string ssColour)
        {
            ssColour = string.Empty;
            Random random = new Random();
            System.Threading.Thread.Sleep(250);
            char[] valid = { 'A', 'B', 'C', 'D', 'E', 'F', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
            StringBuilder sb = new StringBuilder("");
            for(int i = 0; i < 6; i++)
            {
                sb.Append(valid[random.Next(valid.Length)]);
            }
            ssColour = "#" + sb.ToString();       

            // TODO: Write implementation for action
        }

0 comentários:

 
Powered by Blogger