कंसोल में टेक्स्ट का बैकग्राउंड कलर बदलने के लिए, C# में Console.BackgroundColorProperty का उपयोग करें।
उदाहरण
आइए अब एक उदाहरण देखें -
using System;
class Demo {
public static void Main (string[] args) {
Console.BackgroundColor = ConsoleColor.Blue;
Console.WriteLine("Background color changed = "+Console.BackgroundColor);
}
} आउटपुट
यह निम्नलिखित आउटपुट उत्पन्न करेगा -
