2011-07-28 85 views

回答

9
Console.BackgroundColor//t set the background color for the text. 
Console.ForegroundColor//to set the foreground color for the text. 
Console.ResetColor();//set back the foreground color and background color to the default. 
+0

所以,不需要使用windows API! – king9981

4
Console.ForegroundColor = ConsoleColor.Green; 
Console.BackgroundColor = Console.Color.White;