摘要: C# List Examples by Sam Allen - Updated September 6, 2009 Problem. You have questions about the List collection in the .NET Framework, which is located in the System.Collections.Generic namespace. You want to see examples of using List and also explore some of the many useful methods it provides, making it an ideal type for dynamically adding data. Solution. This document has lots of tips and resources on the List constructed type, with examples using the C# programming language. --- Key p 阅读全文
posted @ 2011-05-07 14:56 消逝的幻想 阅读(699) 评论(0) 推荐(0)
摘要: 现在是2004-03-26 13:31:40过去是:2004-01-02 11:30:24要获得两个日期差,差的形式为:XX天XX小时XX分XX秒方法一:DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");try{ Date d1 = df.parse("2004-03-26 13:31:40"); Date d2 = df.parse("2004-01-02 11:30:24"); long diff = d1.getTime() - d2.getTime(); l 阅读全文
posted @ 2011-05-03 15:41 消逝的幻想 阅读(5637) 评论(0) 推荐(1)