上一页 1 ··· 8 9 10 11 12 13 14 下一页
  2010年7月16日
摘要: .NET反射、委托技术与设计模式1 反射技术与设计模式 反射(Reflection)是.NET中的重要机制,通过放射,可以在运行时获得.NET中每一个类型(包括类、结构、委托、接口和枚举等)的成员,包括方法、属性、事件,以及构造函数等。还可以获得每个成员的名称、限定符和参数等。有了反射,即可对每一个类型了如指掌。如果获得了构造函数的信息,即可直接创建对象,即使这个对象的类型在编译时还不知道。 1.... 阅读全文
posted @ 2010-07-16 17:28 TsingCai 阅读(166) 评论(0) 推荐(0) 编辑
  2010年7月15日
摘要: 如下:在窗口构造函数中将CheckForIllegalCrossThreadCalls设置为 falsepublic Form1() { InitializeComponent(); CheckForIllegalCrossThreadCalls = false; }【msdn】如何:对 Windows 窗体控件进行线程安全调用使用多线程提高 Windows 窗体应用程序的性能时,必须注意以线程安... 阅读全文
posted @ 2010-07-15 11:43 TsingCai 阅读(2311) 评论(0) 推荐(1) 编辑
摘要: 方法一、select col1 from table1union select 0order by col1 desc 方法一可以用在金蝶K3自定义报表的KPGETSQL语句中方法二、if exists (select col1 from table1)select col1 from table1else select 0 阅读全文
posted @ 2010-07-15 09:47 TsingCai 阅读(1133) 评论(0) 推荐(0) 编辑
  2010年7月14日
摘要: 1、params关键字可以指定在参数数目可变处采用参数的方法参数。在方法声明中的params关键字后不允许任何其他参数,并且在方法声明中只允许一个params关键字。private void button2_Click(object sender, EventArgs e) { UseParams(6, "c", "good study"); } private void UseParams(pa... 阅读全文
posted @ 2010-07-14 09:19 TsingCai 阅读(408) 评论(0) 推荐(0) 编辑
  2010年7月13日
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading;using System.Windows.Forms;n... 阅读全文
posted @ 2010-07-13 17:14 TsingCai 阅读(437) 评论(0) 推荐(0) 编辑
  2010年7月12日
摘要: C#中HashTable的用法一,哈希表(Hashtable)简述 在.NET Framework中,Hashtable是System.Collections命名空间提供的一个容器,用于处理和表现类似keyvalue的键值对,其中key通常可用来快速查找,同时key是区分大小写;value用于存储对应于key的值。Hashtable中keyvalue键值对均为object类型,所以Hashtabl... 阅读全文
posted @ 2010-07-12 09:13 TsingCai 阅读(283) 评论(0) 推荐(0) 编辑
  2010年7月8日
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;names... 阅读全文
posted @ 2010-07-08 10:10 TsingCai 阅读(159) 评论(0) 推荐(0) 编辑
  2010年7月7日
摘要: using System;using System.Collections.Generic;using System.Text;using System.IO;// For the formatters.using System.Runtime.Serialization.Formatters.Binary;using System.Runtime.Serialization.Formatters... 阅读全文
posted @ 2010-07-07 22:50 TsingCai 阅读(325) 评论(0) 推荐(0) 编辑
  2010年7月6日
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication9{ public part... 阅读全文
posted @ 2010-07-06 17:34 TsingCai 阅读(2133) 评论(1) 推荐(0) 编辑
摘要: 在VB中做 MDI窗体很简单。在C#里就没有这个轻松了,不过还是很方便的。首先在C#里添加一个窗体,命名为MdiMain,将其IsMdiContainer设定成true,这样MDI主窗体就建立了。然后再添加新窗体,命名为MdiChild。现在运行程序,会发现只运行了MdiMain这个主窗体。呵呵因为我们没有写任何代码,第二个窗体当然不能出现了。现在来添加这个代码。在MdiMain窗体上添加一个Me... 阅读全文
posted @ 2010-07-06 11:03 TsingCai 阅读(242) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 下一页