摘要: 在C#中,如果你有一个泛型类或方法,且其中需要创建类型T的实例,但是T并没有指定具有无参构造函数(new()约束),那么编译器不会允许你直接使用new T()来创建实例。 例如,假设你有以下泛型类: Csharp 1public class MyClass<T> 2{ 3 public T Crea 阅读全文
posted @ 2024-04-17 16:34 celestially98 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 两个VM:MainViewModel,TestViewModel 需求:TestViewModel中发消息到MainViewModel处理 写法1: 1.MainViewModel中注册消息处理函数WeakReferenceMessenger.Default.Register<string, str 阅读全文
posted @ 2024-04-16 16:21 celestially98 阅读(6) 评论(0) 推荐(0) 编辑
摘要: C#中,string类型是一个特殊的引用类型。虽然string的赋值看起来像是在传递值,但实际上传递的是string对象的引用。 浅拷贝和深拷贝 阅读全文
posted @ 2024-03-28 11:34 celestially98 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 多目录CMake项目指一个workspace下有多个CMake项目,不需要使用CMakeTool插件 修改tasks.json,添加cmake,按照clean->cmake->make的顺序执行 tasks.json { "version": "2.0.0", "options": { "cwd": 阅读全文
posted @ 2024-01-16 17:20 celestially98 阅读(34) 评论(0) 推荐(0) 编辑
摘要: Prism框架中的Ioc容器 - Hello——寻梦者! - 博客园 (cnblogs.com) 阅读全文
posted @ 2023-10-16 11:52 celestially98 阅读(2) 评论(0) 推荐(0) 编辑
摘要: http://www.skcircle.com/?id=1113 阅读全文
posted @ 2023-10-07 09:32 celestially98 阅读(176) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/liuhao2638/archive/2013/06/13/3134109.html 阅读全文
posted @ 2023-08-18 14:52 celestially98 阅读(2) 评论(0) 推荐(0) 编辑
摘要: VSCode Remote SSH 保存密码 自动登录 – 平平淡淡的博客 (cmtspace.cn) 阅读全文
posted @ 2023-08-03 10:41 celestially98 阅读(6) 评论(0) 推荐(0) 编辑
摘要: C#各种数据库连接字符串大全——SQLServer、Oracle、Access-WinFrom控件库|.net开源控件库|HZHControls官网 阅读全文
posted @ 2023-07-11 17:18 celestially98 阅读(10) 评论(0) 推荐(0) 编辑
摘要: # docker部署SQL Server 2022 参考微软官方文档[Docker:为 Linux 上的 SQL Server 安装容器 - SQL Server | Microsoft Learn](https://learn.microsoft.com/zh-cn/sql/linux/quick 阅读全文
posted @ 2023-07-11 11:27 celestially98 阅读(137) 评论(0) 推荐(0) 编辑