Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#控制台替代方案_C# - Fatal编程技术网

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中,您想做的事情会非常简单。您想用这个示例具体说明什么?所有评论都指什么?它们与这个问题有什么关系?对代码的描述会很有帮助。