随笔分类 - C#
摘要:class Program { static void Main(string[] args) { #region 创建工作线程 //创建工作线程 //Thread thread = new Thread(DoWork); //thread.Name = "工作线程1"; //// 启动线程 //t
阅读全文
摘要:new Guid(System.Security.Cryptography.SHA256.Create().ComputeHash(Encoding.UTF8.GetBytes(itemChild.childId.ToString())).Take(16).ToArray()).ToString()
阅读全文
摘要:删除方法 private void CleanOldLogs(string logFolderPath) { try { DirectoryInfo directory = new DirectoryInfo(logFolderPath); FileInfo[] files = directory.
阅读全文
摘要:1、http+json public string PostHttp(string url, string body,string token) { try { HttpWebRequest Request = (HttpWebRequest)WebRequest.Create(url); Requ
阅读全文
摘要:List<ChemicalInventory> listInventory = new List<ChemicalInventory>(); foreach (var item in response.EX_TAB) { ChemicalInventory Inventory = new Chemi
阅读全文
摘要:Util.SetCertificatePolicy();在请求时加上这句调用 HttpWebRequest request = WebRequest.Create(loginurl) as HttpWebRequest; public static class Util { /// <summary
阅读全文
摘要:public static Image UrlToImage(string url) { try { WebClient mywebclient = new WebClient(); byte[] Bytes = mywebclient.DownloadData(url); using (Memor
阅读全文
摘要:JsonSerializer serializer = new JsonSerializer(); StringWriter sw = new StringWriter(); serializer.Serialize(new JsonTextWriter(sw), groupList); strin
阅读全文
摘要:List<ChemicalInventory> listInventory = new List<ChemicalInventory>(); foreach( ChemicalInventory Inventory = new ChemicalInventory(); //赋值省略 listInve
阅读全文

浙公网安备 33010602011771号