最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

C#学习3-微软C#官方文档Microsoft-dotnet-csharp.pdf

运维笔记admin6浏览0评论

文章目录

    • 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}|");
           }
       }

发布评论

评论列表(0)

  1. 暂无评论