03 2012 档案

linq 笛卡尔积
摘要:List<string> list_1 = new List<string>(); Enumerable.Range(1, 10).ToList().ForEach(i=>list_1.Add(i.ToString())); var query = from s in list_1 from a in list_1 select s + " " + a; var res = query.ToList(); 阅读全文

posted @ 2012-03-31 15:08 雨渐渐 阅读(432) 评论(0) 推荐(0) 编辑

c#控制台相关的设置
摘要:[DllImport("Kernel32.dll")] static extern bool AllocConsole(); [DllImport("Kernel32.dll")] static extern bool FreeConsole(); using System.Runtime.InteropServices;可以实现控制台的隐藏或者显示 阅读全文

posted @ 2012-03-27 17:37 雨渐渐 阅读(205) 评论(0) 推荐(0) 编辑

GetHashCode(一)为啥 如何重写
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace HashCode{ class Program { static void Main(string[] args) { //GetHashCode 值 A a1 = new A(1);//1 A a2 = new A(2);//0 A a3 = new A(3);//1 ... 阅读全文

posted @ 2012-03-26 13:54 雨渐渐 阅读(492) 评论(0) 推荐(0) 编辑

各种时间戳及用途
摘要:(一) /// <summary> /// 获得距离1970-01-01的毫秒数 /// </summary> /// <param name="newDate">时间参数</param> /// <returns></returns> public static long GetMilliSecond(DateTime newDate) { DateTime oldDate = new DateTime(1970, 1, 1); // Difference in days, hours, and mi 阅读全文

posted @ 2012-03-26 09:04 雨渐渐 阅读(283) 评论(0) 推荐(0) 编辑

光驱是D盘了,咋办
摘要:http://dzh.mop.com/whbm/20050620/0/zg5FSI545fca8a55.shtml 阅读全文

posted @ 2012-03-15 09:22 雨渐渐 阅读(142) 评论(0) 推荐(0) 编辑

导航