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