文章分类 -  C#

Visual Studio 2005 Team System
摘要:一,关于Linq延迟执行问题var result=from c in Products where c.Price>500 select c;foreach(Product p in result){ Console.WriteLine(p.Name);}foreach(Product p in result){ Console.WriteLine(p.Name);} 因此,对于上述程序,两... 阅读全文
posted @ 2009-05-14 19:26 yifan 阅读(2727) 评论(0) 推荐(0)
摘要:一:foreach语句如foreach(Product p in result){}内部实际执行的代码为IEnumerator itor=result.GetEnumerator()while(itor.MoveNext()){...} 阅读全文
posted @ 2009-05-14 19:24 yifan 阅读(211) 评论(0) 推荐(0)
摘要:画点的方法: 方法一: 用picGraphics.FillRectangle(new SolidBrush(fillColor), p.X, p.Y, 1, 1); 即用一个像素填充方法. 方法二: 用gdi32.dll库中的SetPixel方法 [DllImport("gdi32.dll")] private static extern int SetPix... 阅读全文
posted @ 2008-04-24 21:37 yifan 阅读(11624) 评论(0) 推荐(0)
摘要:若有以下代码操作存储过程: SqlCommand borrowbook=new SqlCommand(); borrowbook.Connection=this.sqlConnection1; borrowbook.CommandType=CommandType.StoredProcedure; borrowbook.CommandText="dbo.StoredProced... 阅读全文
posted @ 2007-08-01 16:52 yifan 阅读(1536) 评论(0) 推荐(0)
摘要:一,打开搜索搜TlbImp.exe和Excel.exe.二,将这两个文件拷到C:\下.进入命令提示符(win+r,输入cmd),定位到C:\.输入TlbImp Excel.exe 这时将导出Excel.dll.将Excel.dll拷到你的项目所在的Debug目录中.三,打开你的C#项目,如图所示进行操作. 阅读全文
posted @ 2007-06-12 08:55 yifan 阅读(575) 评论(0) 推荐(0)