หากต้องการเปลี่ยนสีพื้นหลังของข้อความในคอนโซล ให้ใช้คุณสมบัติ Console.BackgroundColor ใน C#
ตัวอย่าง
using System;
class Demo {
public static void Main (string[] args) {
Console.BackgroundColor = ConsoleColor.Blue;
Console.WriteLine("Background color changed = " + Console.BackgroundColor);
}
}ผลลัพธ์
