摘要:
c#中常用时间的使用C#中时间、日期的常用输出和存储方式比较还是用不好折叠 static void Main(string[] args) { //获取当前时间 Console.WriteLine(DateTime.Now); //序列化存储时间为二进制 long lTime; lTime = DateTime.Now.ToBinary(); Console.WriteLine(lTime); //反序列化二进制格式 string strTime = DateTime.FromBinary(lTime).ToString(); Console.WriteLine(strTime); //形式如 阅读全文
posted @ 2011-07-20 21:58 itcfj 阅读(159) 评论(0) 推荐(0) 编辑