随笔分类 -  C#

摘要:'' C++ .h STDMETHODIMP MyATL15(LONG a, LONG b, LONG* c); '' C++ .idl [id(1), helpstring("Method MyATL15")] HRESULT MyATL15([in] LONG a, [in] LONG b, [ 阅读全文
posted @ 2023-03-22 09:13 enif 阅读(64) 评论(0) 推荐(0)
摘要:存个档; //十进制转成任意进制 private static string GetCusSN(int num, int strLen, string serialChars) { int slen = serialChars.Length; if (num > Math.Pow(slen, str 阅读全文
posted @ 2022-11-30 10:39 enif 阅读(69) 评论(0) 推荐(0)
摘要:后端:C# .net framework 4.8 WebApi using System; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Net.WebSockets; 阅读全文
posted @ 2022-09-21 15:46 enif 阅读(552) 评论(0) 推荐(0)
摘要:internal string Code128AutoZPL(string planeText) { StringBuilder sb1 = new StringBuilder(); bool isDigit = GetDigitLength(planeText, 0) >= 2; for (int 阅读全文
posted @ 2022-09-03 17:50 enif 阅读(282) 评论(0) 推荐(0)
摘要:需求:将高频且耗时,且数据基本没变化的查询结果,用缓存提升性能。 实现:继承MemoryCache,重载部分方法,在数据库中持久化缓存数据。 本文使用了两级缓存,不用考虑缓存加载。服务重启,读不到内存缓存,会从数据库读取一次。 //泛型类,内部进行二进制序列化与反序列化 using System; 阅读全文
posted @ 2022-07-29 11:16 enif 阅读(305) 评论(0) 推荐(0)

豫ICP备2021034901号