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

文章目录

1.内插表达式的字段宽度和对齐方式

csharp 复制代码
       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}|");
           }
       }
相关推荐
Scout-leaf3 天前
WPF新手村教程(三)—— 路由事件
c#·wpf
用户298698530143 天前
程序员效率工具:Spire.Doc如何助你一键搞定Word表格排版
后端·c#·.net
mudtools4 天前
搭建一套.net下能落地的飞书考勤系统
后端·c#·.net
玩泥巴的4 天前
搭建一套.net下能落地的飞书考勤系统
c#·.net·二次开发·飞书
唐宋元明清21885 天前
.NET 本地Db数据库-技术方案选型
windows·c#
lindexi5 天前
dotnet DirectX 通过可等待交换链降低输入渲染延迟
c#·directx·d2d·direct2d·vortice
西岸行者5 天前
学习笔记:SKILLS 能帮助更好的vibe coding
笔记·学习
悠哉悠哉愿意5 天前
【单片机学习笔记】串口、超声波、NE555的同时使用
笔记·单片机·学习
qq_454245035 天前
基于组件与行为的树状节点系统
数据结构·c#
bugcome_com5 天前
C# 类的基础与进阶概念详解
c#