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