摘要: 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)
摘要: robocopy语法: robocopy <source> <destination> [<file>[ ...]] [<options>] Option Description /s Copies subdirectories. This option automatically excludes 阅读全文
posted @ 2023-11-16 22:48 Senya 阅读(220) 评论(0) 推荐(0)
摘要: 当使用M-Things对KepserverEX的ModbusTCP服务器进行通信测试时,需要在KepserverEX中禁用从零开始寻址,或者M-Things中访问的地址需要偏移一位,如KepserverEX中400100寄存器,M-Things使用400099访问。 阅读全文
posted @ 2023-10-17 09:34 Senya 阅读(44) 评论(0) 推荐(0)