System.Console.BackgroundColor Property

Gets or sets the background color of the console.

Syntax

public static ConsoleColor BackgroundColor { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

A change to the Console.BackgroundColor property affects only output that is written to individual character cells after the background color is changed. To change the background color of the console window as a whole, set the Console.BackgroundColor property and call the Console.Clear method. The following example provides an illustration.

code reference: System.Console.BackgroundColor#1

A get operation for a Windows-based application, in which a console does not exist, returns ConsoleColor.Black.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0