随笔分类 - 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, [
阅读全文
摘要:存个档; //十进制转成任意进制 private static string GetCusSN(int num, int strLen, string serialChars) { int slen = serialChars.Length; if (num > Math.Pow(slen, str
阅读全文
摘要:后端:C# .net framework 4.8 WebApi using System; using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Net.WebSockets;
阅读全文
摘要:internal string Code128AutoZPL(string planeText) { StringBuilder sb1 = new StringBuilder(); bool isDigit = GetDigitLength(planeText, 0) >= 2; for (int
阅读全文
摘要:需求:将高频且耗时,且数据基本没变化的查询结果,用缓存提升性能。 实现:继承MemoryCache,重载部分方法,在数据库中持久化缓存数据。 本文使用了两级缓存,不用考虑缓存加载。服务重启,读不到内存缓存,会从数据库读取一次。 //泛型类,内部进行二进制序列化与反序列化 using System;
阅读全文

浙公网安备 33010602011771号