摘要:
1 using System; 2 using System.IO; 3 using System.Text; 4 using System.Text.RegularExpressions; 5 using System.Runtime.Serialization.Json; 6 using Newtonsoft.Json; 7 using System.Collections.Generic; 阅读全文
posted @ 2019-09-23 21:59
醉酒三分醒
阅读(152)
评论(0)
推荐(0)
摘要:
#region 获取文件后缀 public static string GetExtendName(string filename) { if (!string.IsNullOrEmpty(filename)) { var index = filename.LastIndexOf("."); if (index >= 0) return filename.Substring(index); } r 阅读全文
posted @ 2019-09-23 21:51
醉酒三分醒
阅读(198)
评论(0)
推荐(0)
摘要:
1 public class TimeHelper 2 { 3 #region 实现发表的时间显示 4 /// <summary> 5 /// 实现发表的时间显示为几个月,几天前,几小时前,几分钟前,或几秒前 6 /// </summary> 7 /// <param name="time"></param> 8 /// <returns></returns> 9 public static st 阅读全文
posted @ 2019-09-23 21:25
醉酒三分醒
阅读(267)
评论(0)
推荐(0)
摘要:
1 public class RequestResult 2 { 3 public bool IsSuccess { get; set; } 4 5 public string Message { get; set; } 6 7 public void OnSuccess(String msg = null) 8 { 9 IsSuccess = true; 10 Message = msg; 11 阅读全文
posted @ 2019-09-23 21:23
醉酒三分醒
阅读(311)
评论(0)
推荐(0)
摘要:
1 /// 2 /// 身份证帮助类 3 /// 4 public class IDCardHelper 5 { 6 #region 检测身份证的合法性 7 public static bool Check(string cardId) 8 { 9 st... 阅读全文
posted @ 2019-09-23 21:20
醉酒三分醒
阅读(416)
评论(0)
推荐(0)
摘要:
//string url = "https://www.baidu.com"; //string data = "client_id=21768513&client_secret=5568ab8e4f17b1a91bc732b289933f7d&grant_type=authorization_co 阅读全文
posted @ 2019-09-23 21:19
醉酒三分醒
阅读(798)
评论(0)
推荐(0)
摘要:
#region 发送邮件 public bool Send(string email, string title, string body) { string message="发送成功"; return Send(email, title, body, out message); } public bool Send(string email, string title, string body 阅读全文
posted @ 2019-09-23 21:09
醉酒三分醒
阅读(243)
评论(0)
推荐(0)
摘要:
1 public class Des 2 { 3 public static string Encrypt(string message, string key) 4 { 5 DES des = new DESCryptoServiceProvider(); 6 des.Key = Encoding.UTF8.GetBytes(key); 7 des.IV = Encoding.UTF8.GetB 阅读全文
posted @ 2019-09-23 21:07
醉酒三分醒
阅读(1252)
评论(0)
推荐(0)
摘要:
#region 计算星期几 /// /// //: 星期日至星期六的值为0-6 /// /// /// /// /// public static int GetWeeksOfDate(int year, int mon... 阅读全文
posted @ 2019-09-23 21:05
醉酒三分醒
阅读(788)
评论(0)
推荐(0)
摘要:
1 #region 生成随机字符 2 /// <summary> 3 /// 生成随机字符 4 /// </summary> 5 /// <param name="lens">随机字符长度</param> 6 /// <returns>随机字符</returns> 7 private static string RandomString(int lens) 8 { 9 char[] CharArr 阅读全文
posted @ 2019-09-23 20:58
醉酒三分醒
阅读(253)
评论(0)
推荐(0)

浙公网安备 33010602011771号