随笔分类 -  C#

摘要:xaml中使用MultiBinding绑定多个属性 <Window.Resources> <local:SpecialFeaturesConverter x:Key="SpecialFeaturesConverter" /> <local:BooltoVisibilityConvertor x:Ke 阅读全文
posted @ 2024-03-14 11:20 Senya 阅读(57) 评论(0) 推荐(0)
摘要://Shared Memory using (MemoryMappedFile mmf = MemoryMappedFile.CreateOrOpen("sharedmem",500)) { object obj = new Object(); ManualResetEvent myevent = 阅读全文
posted @ 2024-03-04 13:17 Senya 阅读(287) 评论(0) 推荐(0)
摘要:LINQ 基本概念 语言集成查询(Langrage Integrated Query) 常见用途 .Net原生集合(List,Array,Dictionary,etc.) SQL数据库(EF等ORM尤其适配) XML文档(xmlelement,xelement) JSON文档(Newtonsoft) 阅读全文
posted @ 2024-03-03 02:07 Senya 阅读(189) 评论(0) 推荐(0)
摘要:EPPlus使用前需要先标明使用类型 ExcelPackage.LicenseContext = LicenseContext.NonCommercial; 读取Excel到DataTable try { ExcelPackage xlsx1 = new ExcelPackage(xls1path1 阅读全文
posted @ 2024-03-02 17:00 Senya 阅读(1956) 评论(0) 推荐(0)
摘要:CancellationTokenSource cts = new CancellationTokenSource(); CancellationToken token = cts.Token; string pipename = "testpipe"; Task tserver = Task.Ru 阅读全文
posted @ 2024-03-01 17:16 Senya 阅读(121) 评论(0) 推荐(0)
摘要:C#的一些冷知识(其一) 1.函数参数的传递方式 默认函数传递参数的方式是位置参数,也就是按照参数的声明顺序依次填入,其他还有命名参数的传递方式,如下: Foo("Tom",18,true); Foo("Tom",alive:false); //在C#7.2以后可以在命名参数后继续使用位置参数 Fo 阅读全文
posted @ 2024-02-17 01:17 Senya 阅读(324) 评论(0) 推荐(0)