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