admin管理员组文章数量:1025834
文章目录
- 1.内插表达式的字段宽度和对齐方式
1.内插表达式的字段宽度和对齐方式
static void Main(string[] args) {
var titles = new Dictionary<string, string>() {
["Doyle ,Arthur"] = "Hound of the Basker,The",
["Lodon ,Jack"] = "Call of the Wild ,The",
["Shakesepeare ,William"] = "Tempest,The",
};
Console.WriteLine("Author and title List");
Console.WriteLine();
Console.WriteLine($"|{"Author",-25}|{"Title",30}|");
foreach (var title in titles) {
Console.WriteLine($"|{title.Key,-25}|{title.Value,30}|");
}
}
文章目录
- 1.内插表达式的字段宽度和对齐方式
1.内插表达式的字段宽度和对齐方式
static void Main(string[] args) {
var titles = new Dictionary<string, string>() {
["Doyle ,Arthur"] = "Hound of the Basker,The",
["Lodon ,Jack"] = "Call of the Wild ,The",
["Shakesepeare ,William"] = "Tempest,The",
};
Console.WriteLine("Author and title List");
Console.WriteLine();
Console.WriteLine($"|{"Author",-25}|{"Title",30}|");
foreach (var title in titles) {
Console.WriteLine($"|{title.Key,-25}|{title.Value,30}|");
}
}
版权声明:本文标题:C#学习3-微软C#官方文档Microsoft-dotnet-csharp.pdf 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/jiaocheng/1738214658a1555020.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论