C# 我尝试使用占位符代替串联,但代码运行不正确

C# 我尝试使用占位符代替串联,但代码运行不正确,c#,C#,您需要在WriteLine方法中更改参数顺序 using System; namespace justPractice { class program { static void Main() { Console.WriteLine("how do you feel?"); string feeling = Console.ReadLine();

您需要在
WriteLine
方法中更改参数顺序

using System;
namespace justPractice
{
    class program
    {
        static void Main()
        {                      
            Console.WriteLine("how do you feel?");
            string feeling = Console.ReadLine();
            Console.WriteLine(feeling,  "{0} is a good sign");
            Console.ReadLine();                   
        }
    }
} 
来自文件

Console.WriteLine("{0} is a good sign", feeling);

格式:复合格式字符串(参见备注)

arg0:要使用格式写入的对象

应该是:'Console.WriteLine({0}是个好符号),感觉);'
public static void WriteLine(
    string format,
    object arg0
)