C# Console ForegroundColor

Description

Console ForegroundColor gets or sets the foreground color of the console.

Syntax

Console.ForegroundColor has the following syntax.


public static ConsoleColor ForegroundColor { get; set; }

Example


using System;/*from  w w  w .j a  v  a 2  s.  c om*/

public class Example
{
   public static void Main()
   {
      Console.ForegroundColor = (ConsoleColor) (12);

   }
}




















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version