占位符
常规 不建议
string name = "张三";
string message = "Hello" + name;
优化后
string name = "张三";
string message = string.Format("Hello {0}", name);
在升级
string name = "张三";
string message = $"Hello {name}";
string name = "张三";
string message = "Hello" + name;
string name = "张三";
string message = string.Format("Hello {0}", name);
string name = "张三";
string message = $"Hello {name}";