2020年7月6日

ASP.NETCore3 MVC

摘要: 1.第一步,新建项目,如下图 2.目录结构如下,类似framework里面的mvc和控制台结合体,主要是因为core就是通过控制台(内置服务器)启动网站,自己发布,监听端口,转发请求,不依赖于IIS,可跨平台 3.网站从Program.cs开始运行 4.Startup.cs这个文件类似于global 阅读全文

posted @ 2020-07-06 22:33 不朽阁主 阅读(246) 评论(0) 推荐(0) 编辑

ASP.NETCore2C#7.0新语法

摘要: 1.out参数,不用声明x、y private void DoNoting(out int x, out int y) { x = 1; y = 2; } {//调用 this.DoNoting(out int x, out int y); Console.WriteLine(x + y); thi 阅读全文

posted @ 2020-07-06 22:08 不朽阁主 阅读(350) 评论(0) 推荐(0) 编辑

ASP.NETCore1C#6.0新语法

摘要: 1.字符串嵌入值(String interpolation) Console.WriteLine($"年龄:{{{this.Age}}} 生日:{{{this.BirthDay.ToString("yyyy -MM-dd")}}}"); Console.WriteLine($"{(this.Age 阅读全文

posted @ 2020-07-06 22:00 不朽阁主 阅读(864) 评论(0) 推荐(0) 编辑

导航