c#控制台替代方案
传统系统控制台的最佳替代方案是什么?下面是一个很酷的例子:c#控制台替代方案,c#,C#,传统系统控制台的最佳替代方案是什么?下面是一个很酷的例子: Using System; // <-- You need this for Console class Program { static void Main() { // // 1. Type "Console" and press "." // 2. Select "BackgroundColor". // 3. Press space and "=", then press
Using System; // <-- You need this for Console
class Program
{
static void Main()
{
//
// 1. Type "Console" and press "."
// 2. Select "BackgroundColor".
// 3. Press space and "=", then press tab.
//
Console.BackgroundColor = ConsoleColor.Blue;
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("White on blue.");
Console.WriteLine("Another line."); // <-- This line is still white on blue.
Console.ResetColor();
}
}
使用系统;// 多行RichTextBox是您想要使用的。
将RichTextBox从工具箱拖到窗体上。在“属性”窗口中,将“多行”属性更改为True,并根据需要调整文本框的大小
希望有帮助。您的意思是要在多行文本框中编写文本?它是否只需要控制台。在winforms中,您想做的事情会非常简单。您想用这个示例具体说明什么?所有评论都指什么?它们与这个问题有什么关系?对代码的描述会很有帮助。