03 2018 档案

摘要:今天用asp.net web api写微信小程序的接口时遇到一个问题。 返回的model中的datetime类型的字段自动转换成了“2014-11-08T01:50:06:234”这样的字符串,带上的T和毫秒。 解决办法: 在WebApiConfig中加如下代码: 转自:https://www.la 阅读全文
posted @ 2018-03-31 17:55 liu_xh 阅读(1066) 评论(0) 推荐(0) 编辑
摘要:一、值类型的比较 对于值类型来说 两者比较的都是”内容”是否相同,即 值 是否一样,很显然此时两者是划等号的。 二、引用类型的比较 对于引用类型来说,等号(==)比较的是两个变量的”引用” 是否一样,即是引用的”地址”是否相同。而对于equals来说仍然比较的是变量的 ”内容” 是否一样。 1、字符 阅读全文
posted @ 2018-03-28 14:54 liu_xh 阅读(1344) 评论(0) 推荐(0) 编辑
摘要:1 public class Loger 2 { 3 /// 4 /// 写入日志 5 /// 6 /// 日志内容 7 /// 日志标题 8 /// 文件夹名称 9 /// 文件前缀名 10 public static void ... 阅读全文
posted @ 2018-03-22 14:38 liu_xh 阅读(1472) 评论(0) 推荐(0) 编辑
摘要:使用: 阅读全文
posted @ 2018-03-19 17:00 liu_xh 阅读(456) 评论(0) 推荐(0) 编辑
摘要:在项目中用到的 效果如下: 阅读全文
posted @ 2018-03-19 10:54 liu_xh 阅读(4838) 评论(1) 推荐(0) 编辑
摘要:具体内容见:https://www.cnblogs.com/changbaishan/p/4387351.html 阅读全文
posted @ 2018-03-12 11:17 liu_xh 阅读(1098) 评论(0) 推荐(0) 编辑
摘要:1 DispatcherTimer = new DispatcherTimer(); 2 Timer.Tick += Timer_Tick; 3 Timer.Interval = TimeSpan.FromSeconds(1); 4 Timer.Start(); 5 6 7 private void Timer_Tick(object sender, EventArgs e) ... 阅读全文
posted @ 2018-03-09 14:46 liu_xh 阅读(2390) 评论(0) 推荐(0) 编辑
摘要:1 //获取今天是星期几 2 string[] Day = new string[] { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; 3 string week = Day[Convert.ToInt32(DateTime.Now.DayOfWeek.ToString("d"))].ToSt... 阅读全文
posted @ 2018-03-09 14:22 liu_xh 阅读(5798) 评论(0) 推荐(0) 编辑
摘要:1 2 3 4 5 6 7 8 9 10 11 阅读全文
posted @ 2018-03-09 10:08 liu_xh 阅读(402) 评论(0) 推荐(0) 编辑
摘要:1 public static bool IsValidIp(string strIn) 2 { 3 bool b = Regex.IsMatch(strIn, @"^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$"); 4 5 return b; 6 } 阅读全文
posted @ 2018-03-08 16:13 liu_xh 阅读(4197) 评论(2) 推荐(0) 编辑
摘要:从一个目录选择一个文件,复制到另一个目录 阅读全文
posted @ 2018-03-08 10:59 liu_xh 阅读(1532) 评论(0) 推荐(0) 编辑
摘要:感谢Sunny秋刀鱼。https://www.cnblogs.com/527289276qq/p/5595798.html 在页面或者窗口Unloaded事件中关闭串口即可。 阅读全文
posted @ 2018-03-06 11:49 liu_xh 阅读(5764) 评论(0) 推荐(0) 编辑
摘要:转自:http://blog.csdn.net/xuejiren/article/details/39449515 阅读全文
posted @ 2018-03-03 09:12 liu_xh 阅读(469) 评论(0) 推荐(0) 编辑

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