标签:class rod string hat ring date similar out mil
string name = "Mark";
var date = DateTime.Now;
复合格式设置{}:
// Composite formatting: Console.WriteLine("Hello, {0}! Today is {1}, it‘s {2:HH:mm} now.", name, date.DayOfWeek, date);
内插字符串$:
// String interpolation: Console.WriteLine($"Hello, {name}! Today is {date.DayOfWeek}, it‘s {date:HH:mm} now.");
// Both calls produce the same output that is similar to:
// Hello, Mark! Today is Wednesday, it‘s 19:40 now.
标签:class rod string hat ring date similar out mil
原文地址:https://www.cnblogs.com/uftwkb24/p/9202947.html