简体   繁体   English

如何从 C# 控制台应用程序中删除光标线?

[英]How to remove the cursor line from a C# Console Application?

I have already managed to remove the cursor itself with Console.CursorVisible = false;我已经设法使用Console.CursorVisible = false;删除光标本身。 . . However, the line that the cursor exists in still takes up space at the bottom of my program.但是,光标所在的行仍然占用我程序底部的空间。 In other words, I would like to print to my console so that it fills the entire console screen.换句话说,我想打印到我的控制台,以便它填满整个控制台屏幕。 Here's an image of how it currently looks, with the bottom row not getting filled.这是它当前外观的图像,底行没有被填充。

在此处输入图像描述

Can you show what you're doing to fill up the space?你能展示你正在做什么来填补这个空间吗? The solution may just be as simple as using Console.Write() instead of Console.WriteLine() so that it doesn't automatically make a new line, which in turn shouldn't create that empty line at the bottom解决方案可能就像使用 Console.Write() 而不是 Console.WriteLine() 一样简单,这样它就不会自动创建一个新行,这反过来也不应该在底部创建那个空行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM