C# में कंसोल के CursorTop को बदलने के लिए, Console.CursorTop प्रॉपर्टी का उपयोग करें
उदाहरण
आइए अब एक उदाहरण देखें -
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.CursorTop = 20;
Console.WriteLine("\nCursorTop = "+Console.CursorTop);
}
} आउटपुट
यह निम्नलिखित आउटपुट देगा -
