随笔分类 -  C#

摘要:1 public static string GetText<T>(T msg) { object[] attrs = msg.GetType().GetField(msg.ToString()).GetCustomAttributes(typeof(DescriptionAttribute), f 阅读全文
posted @ 2021-01-05 17:00 waityu 阅读(255) 评论(0) 推荐(0)
摘要:1 打开控制面板=》启用或关闭Windows功能=》在WCF服务目录下勾选 HTTP激活,如下图 2 打开IIS,在网站右侧的处理程序映射中,查看服务是否已注册 双击进入查看 阅读全文
posted @ 2020-12-26 15:09 waityu 阅读(2522) 评论(0) 推荐(1)
摘要:按住Alt+上/下箭头,可将当前行上下移动位置 阅读全文
posted @ 2020-12-13 19:43 waityu 阅读(639) 评论(0) 推荐(0)
摘要:1 public static string GetRootPath() { // 是否为SSL认证站点 string secure = HttpContext.Current.Request.ServerVariables["HTTPS"]; string httpProtocol = (secu 阅读全文
posted @ 2020-12-08 16:19 waityu 阅读(778) 评论(0) 推荐(0)
摘要:在字段名前面加@符号 public bool @checked { get; set; } 阅读全文
posted @ 2020-11-25 21:24 waityu 阅读(1821) 评论(0) 推荐(1)
摘要:1 format 一个单格式说明符,它指示如何格式化此 Guid 的值。 format 参数可以是“N”、“D”、“B”、“P”或“X”。 如果 format 为 null 或空字符串 (""),则使用“D”。 2 下表显示参数的接受格式说明符 format 。 "0" 表示一个数字;连字符 ( " 阅读全文
posted @ 2020-10-21 21:58 waityu 阅读(730) 评论(0) 推荐(0)
摘要:string IP = HttpContext.Request.UserHostAddress; 阅读全文
posted @ 2020-09-26 17:12 waityu 阅读(215) 评论(0) 推荐(0)
摘要:^(-|\+)?\d+(\.\d+)?$ 阅读全文
posted @ 2020-07-02 16:16 waityu 阅读(841) 评论(0) 推荐(0)