2019年4月24日

C# CRC - 16

摘要: CRC校验位using System; static class Program { static void Main() { string input = "8000"; var bytes = HexToBytes(input); string hex = Crc16.ComputeChecks 阅读全文

posted @ 2019-04-24 17:52 马什么梅 阅读(1046) 评论(0) 推荐(0) 编辑

char* 与 string 互转

摘要: 因为c#强调安全性,每次意图将string的地址赋给指针时,系统都要报错,原因是系统无法计算字符串的空间和地址,这里不多bb,使用IntPtr类(using Runtime.InteropServices),就是类似于指针的东西,只不过指向非托管的内存块。 一般对于char* ,void*这种可以直 阅读全文

posted @ 2019-04-24 14:40 马什么梅 阅读(729) 评论(0) 推荐(0) 编辑

导航