08 2024 档案

摘要:Invoke是同步更新,会阻塞所在工作者线程,而BeginInvoke是异步更新,不会阻塞当前线程 阅读全文
posted @ 2024-08-26 13:38 echo-efun 阅读(9) 评论(0) 推荐(0) 编辑
摘要:public static void Main() { List<int>? numbers = null; int? a = null; Console.WriteLine((numbers is null)); //true // 如果numbers为空,则初始化numbers,同时添加一个5到 阅读全文
posted @ 2024-08-23 16:33 echo-efun 阅读(11) 评论(0) 推荐(0) 编辑
摘要:public static async Task Main() { Task<int> downloading = TaskAsync(); Console.WriteLine($"{nameof(Main)}: A"); int bytesLoaded = await downloading; C 阅读全文
posted @ 2024-08-23 16:06 echo-efun 阅读(7) 评论(0) 推荐(0) 编辑
摘要:非引用类型初始化为空,类型后面加? int? value = null; //在不想指定value一个初始值情况下,指定value为空 阅读全文
posted @ 2024-08-22 10:50 echo-efun 阅读(6) 评论(0) 推荐(0) 编辑
摘要:<Viewbox Stretch="Fill"> 布局内容 </Viewbox> 阅读全文
posted @ 2024-08-20 18:56 echo-efun 阅读(8) 评论(0) 推荐(0) 编辑
摘要:https://learn.microsoft.com/zh-cn/dotnet/core/porting/ 阅读全文
posted @ 2024-08-14 14:18 echo-efun 阅读(4) 评论(0) 推荐(0) 编辑
摘要://view和viewmodel绑定 DataContext = LogViewModel.Instance; //指具体绑定对象 阅读全文
posted @ 2024-08-13 15:45 echo-efun 阅读(18) 评论(0) 推荐(0) 编辑
摘要:TextWrapping="Wrap" 不显示滚动条 ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" 阅读全文
posted @ 2024-08-13 15:24 echo-efun 阅读(28) 评论(0) 推荐(0) 编辑
摘要:System.Windows.Markup.XamlParseException:““设置属性“Prism.Mvvm.ViewModelLocator.AutoWireViewModel”时引发了异常。”,行号为“8”,行位置为“14”。” MissingMethodException: 没有为该对 阅读全文
posted @ 2024-08-13 14:35 echo-efun 阅读(292) 评论(0) 推荐(0) 编辑
摘要:1.ConcurrentDictionary ConcurrentDictionary 并发字典,保证多线程情况下的安全性 Dictionary 非线程安全集合 using System.Collections.Concurrent; class Program { static void Main 阅读全文
posted @ 2024-08-09 10:16 echo-efun 阅读(4) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示