Change console foreground color and background color : Console « Development Class « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Class Interface
3. Collections Data Structure
4. Components
5. Data Types
6. Database ADO.net
7. Design Patterns
8. Development Class
9. Event
10. File Stream
11. Generics
12. GUI Windows Form
13. Language Basics
14. LINQ
15. Network
16. Office
17. Reflection
18. Regular Expressions
19. Security
20. Services Event
21. Thread
22. Web Services
23. Windows
24. XML
25. XML LINQ
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
C# / C Sharp » Development Class » ConsoleScreenshots 
Change console foreground color and background color
Change console foreground color and background color

using System;

public class Test{
   static void Main(string[] args){
      Console.Title = "Standard Console";
      Console.ForegroundColor = ConsoleColor.Red;
      Console.BackgroundColor = ConsoleColor.Green;
      Console.WriteLine("Press Enter to change the Console's appearance.");
      Console.ReadLine();
  }
}



           
       
Related examples in the same category
1. Echo some stats
2. Read a line of string and check its length
3. WriteLine and Write
4. Printing one line of text with multiple statements.
5. Printing multiple lines with a single statement.
6. Printing multiple lines of text with string formatting.
7. Displaying the sum of two numbers input from the keyboard.
8. Clear consoleClear console
9. Set console: title, window size, buffer height and width, cursor positionSet console: title, window size, buffer height and width, cursor position
10. CursorVisible ResetColor SetWindowSize BufferHeight BufferWidth CursorLeft CursorSize CursorTop
11. Use Red and Green from ConsoleColor
12. Beep
13. Beep(200, 300)
w__w_w__.j_av___a2__s.__co___m_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.