使用了$,就可以在原来占位符的地方直接用参数代替如:Console.WriteLine(“this is a:{0} ,this is b:{1}”,m_a,m_b)变成:Console.WriteLine($”this is a:{m_a} ,this is b:{m_b}”);