随笔分类 -  C#

摘要:using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Cryptography; using System.Text; namespace ConsoleApp1 { public class EncryptUtil { ... 阅读全文
posted @ 2017-11-21 16:07 杜子烟 阅读(310) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; namespace ConsoleApp1 { class Program { /// ... 阅读全文
posted @ 2017-11-21 15:36 杜子烟 阅读(1612) 评论(0) 推荐(0) 编辑
摘要:下载地址:https://github.com/0xd4d/dnSpy/releases无需安装,和 ILSPY同门,感觉比ILSPY还强大 直接把dll拖拽到程序集资源管理器里面就可以啦 阅读全文
posted @ 2017-11-21 10:40 杜子烟 阅读(1311) 评论(1) 推荐(0) 编辑
摘要:下载地址:http://ilspy.net/ 中文版下载地址:http://www.fishlee.net/soft/ilspy_chs 对dll和exe文件反编译: 阅读全文
posted @ 2017-11-20 10:23 杜子烟 阅读(945) 评论(1) 推荐(0) 编辑
摘要:?代表可空类型修饰符 引用类型可以使用空引用表示一个不存在的值,而值类型通常不能表示为空。为了使值类型也可为空,就可以使用可空类型?:带便三元表达式 int a=b>c?b:c 如果b大于c,a就等于b,否则等于c??代表空合并运算符 用于定义可空类型和引用类型的默认值。如果此运算符的左操作数不为n 阅读全文
posted @ 2017-11-16 17:56 杜子烟 阅读(551) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; namespace ConsoleApp1 { class Program { /// ... 阅读全文
posted @ 2017-11-14 14:41 杜子烟 编辑
摘要:using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; namespace ConsoleApp1 { class Program { /// ... 阅读全文
posted @ 2017-11-09 15:19 杜子烟 阅读(166) 评论(0) 推荐(0) 编辑
摘要:转自:http://www.cnblogs.com/csharpx/archive/2010/05/27/1745122.html 阅读全文
posted @ 2017-10-26 15:17 杜子烟 阅读(128) 评论(0) 推荐(0) 编辑
摘要:1 //分组 2 var ll= lst.GroupBy(x => new { x.Id, x.Name }).Select(x => new 3 { 4 Key = x.Key, 5 Id = x.First().Id, 6 Name = x.First().Na... 阅读全文
posted @ 2017-10-26 10:29 杜子烟 阅读(622) 评论(0) 推荐(0) 编辑
摘要:C:\Windows\System32>xsd.exe c:/Createst.xsd -c C:\Windows\System32>xsd.exe c:/Creauest.xsd /c /Language:C# /outputdir:d:\ 生成的cs带命名空间:C:\Windows\System 阅读全文
posted @ 2017-10-16 11:00 杜子烟 编辑
摘要:1.与Date.Parse()方法的区别:Date.Parse(object o)方法接受一个object类型的参数,当参数为空或转换失败时会抛出异常DateTime.TryParse方法不会抛出异常 2.用法介绍方法定义 : DateTime.TryParse(string strTime,out 阅读全文
posted @ 2017-08-15 14:09 杜子烟 阅读(1010) 评论(0) 推荐(0) 编辑
摘要:/// /// 从URL获取值(字符串) /// public static string GetValueFromUrl(string key) { string keyvalue = HttpContext.Current.Request.QueryString[key]; i... 阅读全文
posted @ 2017-06-09 22:36 杜子烟 阅读(548) 评论(0) 推荐(0) 编辑
摘要:/// /// MD5 32位加密(大写) /// /// /// static string UserMd5(string str) { string cl = str; string pwd = ""; MD5 md5... 阅读全文
posted @ 2017-06-09 22:19 杜子烟 阅读(1713) 评论(0) 推荐(1) 编辑
摘要:static void Main(string[] args) { #region 定时器 TimerDemo td = new TimerDemo("TimerDemo", 1000); td.Enabled = true; td.TickEvent += TestHandler;... 阅读全文
posted @ 2017-06-09 21:58 杜子烟 编辑