随笔分类 -  C#

摘要:public string GetModelValue(string FieldName, object obj) { try { Type Ts = obj.GetType(); object o = Ts.GetProperty(FieldName).GetVal... 阅读全文
posted @ 2018-10-12 09:17 小小高 阅读(4679) 评论(0) 推荐(0) 编辑
摘要:句柄有时候找不到,用循环比较靠谱 阅读全文
posted @ 2018-04-28 09:48 小小高 阅读(1302) 评论(0) 推荐(0) 编辑
摘要://获取客户端计算机名称 System.Net.IPAddress clientIP = System.Net.IPAddress.Parse(Request.UserHostAddress);//根据目标IP地址获取IP对象 System.Net.IPHostEntry ihe = System.Net.Dns.GetHostEntry(cl... 阅读全文
posted @ 2017-08-31 12:21 小小高 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-08-25 15:15 小小高 阅读(161) 评论(0) 推荐(0) 编辑
摘要:https://files.cnblogs.com/files/gaocong/csprjDistinct.rar 阅读全文
posted @ 2017-08-24 19:35 小小高 阅读(123) 评论(0) 推荐(0) 编辑
摘要:使用: List<string> list = new List<string>(); list.Add("1"); list.Add("1"); list.Add("2"); list.Add("1"); list.Add("3"); list.Add("3"); Purge(ref list); 阅读全文
posted @ 2017-08-22 18:51 小小高 阅读(6547) 评论(1) 推荐(0) 编辑
摘要:调用 string path = @"..\..\upload\demo.xml"; distinct(path); 阅读全文
posted @ 2017-08-22 18:47 小小高 阅读(876) 评论(0) 推荐(0) 编辑
摘要:public ActionResult Index() { XDocument doc = XDocument.Load(@"G:\users\kim.gao\documents\visual studio 2015\Projects\test\test\test.csproj"); ContainFileToCsproj(@... 阅读全文
posted @ 2017-08-16 21:26 小小高 阅读(365) 评论(0) 推荐(0) 编辑
摘要:第一个有智能提示、不过不支持深色背景的,颜色有冲突。 阅读全文
posted @ 2017-08-09 11:20 小小高 阅读(214) 评论(0) 推荐(0) 编辑
摘要:/// /// 物理路径转网络路径 /// /// /// public string urlconvertor(string path) { string tmpRootDir = HttpContext.Current.Server.MapPath(Syst... 阅读全文
posted @ 2017-08-08 20:23 小小高 阅读(233) 评论(0) 推荐(0) 编辑
摘要:public class RouteConfig { private static string[] namespaces = new string[1] { "Best.Site.Areas.BestPalace" }; public static void RegisterRoutes(RouteCollection routes) ... 阅读全文
posted @ 2017-08-07 20:43 小小高 阅读(988) 评论(0) 推荐(0) 编辑
摘要://RequireAttribute.cs 阅读全文
posted @ 2017-08-07 14:09 小小高 阅读(531) 评论(0) 推荐(0) 编辑
摘要:1.nuget安装依赖 2.配置注入规则(Global.asax) crud注入Controller //基于SqlSugarOrm的依赖注入: interface: //实现类 在控制器中的注入: CRUD: //interface //实现类 阅读全文
posted @ 2017-08-07 14:00 小小高 阅读(296) 评论(0) 推荐(0) 编辑
摘要:ActivationContext ac = AppDomain.CurrentDomain.ActivationContext; ApplicationIdentity ai = ac.Identity; Console.WriteLine("Full name = " + ai.FullName); Console.WriteLine("Code base = " + ai.CodeBase... 阅读全文
posted @ 2017-07-03 18:39 小小高 阅读(177) 评论(0) 推荐(0) 编辑
摘要:解决方法: require("!style-loader!css-loader!./style.css"); require("!style-loader!css-loader!./style.css"); 阅读全文
posted @ 2017-06-13 15:14 小小高 阅读(217) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; namespace setIp { public class Command { /**/ /// /// ... 阅读全文
posted @ 2017-05-19 14:25 小小高 阅读(566) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2017-04-28 12:16 小小高 阅读(135) 评论(0) 推荐(0) 编辑
摘要:HttpWebResponse res = null; try { res = request.GetResponse() as HttpWebResponse; } catch (WebException ex) { res = (HttpWebResponse)... 阅读全文
posted @ 2017-04-22 10:29 小小高 阅读(1236) 评论(0) 推荐(0) 编辑
摘要:CookieCollection cookList = new CookieCollection(); cookList.Add(new Cookie("cf_clearance", "31233dc649a45d559ab4f624eba501646d9a7c8a-1492325756-57600", "/", ".taokemiao.com")); 阅读全文
posted @ 2017-04-16 15:22 小小高 阅读(3070) 评论(0) 推荐(0) 编辑
摘要:/// /// 时间戳与DateTime互转 /// public class UnixOfTimeHelper { /// /// 时间转unix时间戳 /// /// 北京时间1970-01-01 08:00:00 /// public static ... 阅读全文
posted @ 2017-03-24 16:27 小小高 阅读(989) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示