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