c# 中 $符号的用法

var names = new List<string> { "jason", "Ana", "Felipe" };
foreach (var name in names)
{
Console.WriteLine($"Hello {name.ToUpper()}!");
//Console.WriteLine("Hello"+ name.ToUpper());
}
posted @ 2018-09-13 11:52  jasonlai2016  阅读(1670)  评论(1编辑  收藏  举报