随笔分类 -  .net mvc

摘要:ps:提高了编程效率,而且相当好用,自己随时可以添加新的扩展 public static class CommomExtentions { public static bool IsNullOrEmpty(this string str) { return string.IsNullOrEmpty( 阅读全文
posted @ 2021-11-12 16:04 212的s 阅读(28) 评论(0) 推荐(0) 编辑
摘要:public static class Ex{ public static T2 Map< T2>(this object t1) where T2 : class { var t1_Pinfos = t1.GetType().GetProperties(); var t2_Pinfos = typ 阅读全文
posted @ 2021-11-12 15:54 212的s 阅读(22) 评论(0) 推荐(0) 编辑
摘要:public static string ExportAOrder(ExportData data) { var cellHeard = new Dictionary<string, string> { { "sort","序号"}, { "modeName","型号名称"}, { "modeCod 阅读全文
posted @ 2021-11-12 15:38 212的s 阅读(57) 评论(0) 推荐(0) 编辑
摘要:.net framework版本太低,改为.net 4.5以上版本即可。 framework4.5以下版本SecurityProtocolType定义的TLS协议是1.0的,4.5以上是有1.2版本。 或者发送HTTPS请求前加入下行代码解决问题 ServicePointManager.Securi 阅读全文
posted @ 2021-11-12 15:25 212的s 阅读(316) 评论(0) 推荐(0) 编辑
摘要:public static string GetTimeStamp() { TimeSpan ts = DateTime.Now - new DateTime(1970, 1, 1, 0, 0, 0, 0); return Convert.ToInt64(ts.TotalSeconds).ToStr 阅读全文
posted @ 2021-11-12 15:22 212的s 阅读(25) 评论(0) 推荐(0) 编辑

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