摘要: C# 2.0 为了线程安全,不充许子线程直接访问窗体中的控件如果在子线程中直接访问说窗体控件,编译器会提示,控件不是由该线程创建的. 那么在子线程中如何访问窗体中的控件呢?在窗体的构造函数中加入这一句pdfControl.CheckForIllegalCrossThreadCalls = false... 阅读全文
posted @ 2013-01-09 11:53 gnhao 阅读(698) 评论(0) 推荐(0) 编辑
摘要: 平均调用时间差别一秒左右。 C#调用C++代码: [DllImport("UseCPP.dll")]public static extern int Add(int x, int y); C++代码: #include "stdafx.h"extern "C" __declspec(dllexpor... 阅读全文
posted @ 2013-01-09 11:47 gnhao 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 任何语言的学习,要快速掌握,不在看书,而在实践。题记 .NET技术从1.1发展到2.0,内核基本完善,从.NET 2.0开始学习是个明智的选择。而NET 3.5以及即将推出的.NET 4.0所新加的技术如LINQ,弱语言支持等等,是初学者不用太关心的技术,用到再学吧,要不你会这么多技术书压着停步... 阅读全文
posted @ 2013-01-09 11:40 gnhao 阅读(1473) 评论(0) 推荐(0) 编辑
摘要: string filename = Session["file"] as string; string path = Server.MapPath("~/files/" + filename); if (File.Exists(path)) { FileInfo fi = new FileInfo(path); ... 阅读全文
posted @ 2013-01-09 11:32 gnhao 阅读(123) 评论(0) 推荐(0) 编辑