个人c#编码约定 继承C#编码约定

1、内插字符 串取代  字符串复合格式设置

使用这个写法:
Console.WriteLine($"Hello, {name}! Today is {date.DayOfWeek}, it's {date:HH:mm} now.");
淘汰以下写法:
Console.WriteLine("Hello, {0}! Today is {1}, it's {2:HH:mm} now.", name, date.DayOfWeek, date);
// String interpolation:

 

posted @ 2021-09-04 20:13  小林野夫  阅读(40)  评论(0编辑  收藏  举报
原文链接:https://www.cnblogs.com/cdaniu/