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}|");
           }
       }
相关推荐
小Tomkk4 小时前
2025年PMP 学习十五 第10章 项目资源管理
学习·pmp·项目pmp
oceanweave5 小时前
【K8S学习之生命周期钩子】详细了解 postStart 和 preStop 生命周期钩子
学习·kubernetes
CoderIsArt6 小时前
参数系统的基类Parameter抽象类
c#
盛夏绽放7 小时前
Python字符串常用方法详解
开发语言·python·c#
黄暄7 小时前
初识计算机网络。计算机网络基本概念,分类,性能指标
笔记·学习·计算机网络·考研
梅子酱~8 小时前
Vue 学习随笔系列二十三 -- el-date-picker 组件
前端·vue.js·学习
Alice-YUE9 小时前
【HTML5学习笔记1】html标签(上)
前端·笔记·学习·html·html5
jerry6099 小时前
LLM笔记(五)概率论
人工智能·笔记·学习·概率论
Tummer836311 小时前
C#+WPF+prism+materialdesign创建工具主界面框架
开发语言·c#·wpf
threelab12 小时前
12.three官方示例+编辑器+AI快速学习webgl_buffergeometry_indexed
学习·编辑器·webgl