03 2019 档案
摘要:首先在添加引用中选中System.Management 再在开始部门: using System.Management; using System.Management.Instrumentation; private void GetInfo() { string cpuInfo = "";//cpu序列号 ManagementClass cimobject = new Managem...
阅读全文
摘要:string outPutString = null; string prikey; string pubkey; bool isSeccess = false; using (RSACryptoServiceProvider rsa = new RSACryptoServic...
阅读全文
摘要:public static class ex { public static byte[] RightShift(this byte[] ba, int n) { if (n >= tempN; } else ...
阅读全文
摘要:public static class DataContractHelper { public static void ToDCFile(this T obj, string path) { //路径 FileStream fs = new FileStream(path, FileMode.C...
阅读全文
摘要:public static class BinarySerializationHelper { public static void ToBinaryFile(this T tempSerializeList, string path) // 二进制序列化 { //路径 var fs = new FileStream(path, Fil...
阅读全文
摘要:namespace Test { using System; using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; using Test.Share; using Microshaoft; public class ...
阅读全文
摘要:1. 声明静态事件 2.静态属性 setter 3. xmal 这里比较重要, 要加括号 不然不能正常通知 甚至编译时异常 T-T 4. 只有.net frameWork 4.5以上才有这个功能,
阅读全文
摘要:转载自 :https://blog.csdn.net/jiankunking/article/details/50016043 using System; using System.Collections.Generic; using System.Linq; using System.Text;
阅读全文
摘要:#region WPF发送和接收win32消息 public const int WM_GETTEXT = 0x0D; public const int WM_SETTEXT = 0x0C; public const int WM_SIZEING = 0x0214; public const int WM_COPYDATA = 0x...
阅读全文
摘要:public static class XmlHelper { public static T FromXmlFile(this string filePath) where T : new() { T result = new T(); if (!File.Exists(filePath))...
阅读全文