上一页 1 2 3 4 5 6 ··· 26 下一页
摘要: install-package WindowsAPICodePack var folderDialog = new CommonOpenFileDialog() { Title = "xxx", IsFolderPicker = true, }; if (folderDialog.ShowDialo 阅读全文
posted @ 2024-01-16 21:44 JohnYang819 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 字符串的存储长度是可变的,在C#中,BinaryWriter和BinaryReader在Write,ReadStirng的时候,都在单个流中字符串的二进制数组前面加了一个二进制数组的长度信息,方便读取的时候,造成了记录字符串的流并不纯粹是字符串的内容。但是,有时候,我们可以,也可能必须记录纯粹的字符 阅读全文
posted @ 2024-01-15 10:14 JohnYang819 阅读(7) 评论(0) 推荐(0) 编辑
摘要: (1)与关键字冲突,解决办法加@ var a = new { @class=1, }; var d = JsonConvert.SerializeObject(a); Console.WriteLine(d); output {"class":1} (2)接参数,dynamic神搭配! var a 阅读全文
posted @ 2024-01-12 19:20 JohnYang819 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1.赋予参数 @page "{id}" @model RazorTest.Pages.TestBModel @{ } <p>TestBId is @Model.TestBId</p> using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore 阅读全文
posted @ 2024-01-02 13:55 JohnYang819 阅读(25) 评论(0) 推荐(0) 编辑
摘要: cshtml.cs using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace RazorTest.Pages { public class PrivacyModel : PageModel 阅读全文
posted @ 2024-01-01 11:12 JohnYang819 阅读(38) 评论(0) 推荐(0) 编辑
摘要: ASP.NET Core中路由的过程:routing middleware把传入的url与一系列模板进行比对,选择相应的endpoint handler,并将其记录在HttpContext上的request上。endpoint middleware执行选择的endpoint hander,并返回re 阅读全文
posted @ 2023-12-31 11:21 JohnYang819 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 1.状态码返回之演化之路 1.1最基本的就是用Results或者TypedResults返回带有状态码的响应(可选Json响应体) app.MapGet("/fruit/{id}", (string id) => { if (_fruit.TryGetValue(id, out Fruit frui 阅读全文
posted @ 2023-12-30 17:46 JohnYang819 阅读(118) 评论(0) 推荐(0) 编辑
摘要: <Button Width="100" Height="150"> <Button.Content> <TextBlock Text="简图库" TextAlignment="Center"> <TextBlock.LayoutTransform> <RotateTransform Angle="- 阅读全文
posted @ 2023-12-27 15:13 JohnYang819 阅读(48) 评论(0) 推荐(0) 编辑
摘要: Docker默认安装在C盘,这未来随着docker使用必定会导致C盘空间吃紧。所以本文提前进行空间布局,将docker默认安装路径软链接到D盘。软链接D盘Docker默认安装路径为C:\Program Files\Docker。使用管理员权限打开命令终端mklink /j "C:\Program F 阅读全文
posted @ 2023-12-23 10:38 JohnYang819 阅读(953) 评论(0) 推荐(0) 编辑
摘要: INotifyCollectionChanged 接口是 System.Collections.Specialized 命名空间中的一个接口,用于在集合发生更改时通知订阅者。这个接口通常在实现了集合的类中使用,以便在集合变化时通知监听者(如 UI 控件)进行更新。 以下是 INotifyCollec 阅读全文
posted @ 2023-12-17 10:18 JohnYang819 阅读(255) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 26 下一页