Dec 20th, 2011, 11:01 AM
Random Console Colors!
The ConsoleColor enum has 16 values.
var random = new Random();
for(var i; i < 100; i++)
Console.ForegroundColor = (ConsoleColor)random.Next((int)ConsoleColor.Black, (int)ConsoleColor.Yellow);
Console.BackgroundColor = (ConsoleColor)random.Next((int)ConsoleColor.Black, (int)ConsoleColor.Yellow);
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
Jan 19th, 2012, 03:08 AM
Re: Random Console Colors!
Cool did not know about the color stuff thanks for shareing.
Tags for this Thread
Click Here to Expand Forum to Full Width