Để thay đổi màu nền của văn bản trong Console, sử dụng thuộc tính Console.BackgroundColor trong C#.
Ví dụ
using System;
class Demo {
public static void Main (string[] args) {
Console.BackgroundColor = ConsoleColor.Blue;
Console.WriteLine("Màu nền đã thay đổi = " + Console.BackgroundColor);
}
}
Kết quả
