![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CodeFragment
shenck1992
这个作者很懒,什么都没留下…
展开
-
C# Datetime和Long之间转换
Long格式:标准时间从1970年到现在的毫秒数,可以再浏览器里打印 Number(new Date())验证public static long ConvertDataTimeLong(DateTime dt){DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));转载 2015-06-13 17:39:49 · 16914 阅读 · 1 评论 -
C#控制台-及时检测按键
有时候需要这种应用:控制台程序在运行,然后等待用户随时按键来暂停运行,直接用Console.ReadKey 会阻塞运行,那么如何不阻塞的检测按键: while ( true ) { Thread.Sleep(100); Console.WriteLine("----------"); while ( Console.KeyAvailable)原创 2015-08-17 09:51:28 · 7447 阅读 · 1 评论