傻强

岂是池鱼恋旧渊,敢比雄鹰上九天。
轻酌小唱性情酣,宏图霸业谈笑间。

导航

文章分类 -  .NetFramework

C#2.0范型---资源库模式
摘要:using System;using System.Collections.Generic;using System.Text;using System.Collections;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { ... 阅读全文

posted @ 2005-07-06 15:14 傻强 阅读(461) 评论(0) 推荐(0)

C#2.0范型--用范型实现单例模式
摘要:执行环境:VS2005Beta1 Using directives#region Using directivesusing System;using System.Collections.Generic;using System.Text;using System.Reflection;#endregionnamespace GenericsSingleton{ /**//... 阅读全文

posted @ 2005-06-13 16:17 傻强 阅读(394) 评论(0) 推荐(0)

treeView控件点击鼠标右键就改变SelectedNode属性的方法
摘要:winform的treeview控件点击鼠标右键是不能引起SelectNode属性跟着改变的,这回引起右键菜单不正确,解决办法是在treeView控件的mousedown事件中加入如下代码 private void treeViewConditon_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) ... 阅读全文

posted @ 2005-05-18 11:19 傻强 阅读(938) 评论(0) 推荐(0)

CodeDom生成代码编译后反射调用
摘要:代码: 1usingSystem; 2usingSystem.CodeDom; 3usingSystem.CodeDom.Compiler; 4usingSystem.Collections; 5usingSystem.IO; 6usingSystem.Reflection; 7usingMicrosoft.CSharp; 8... 阅读全文

posted @ 2005-05-13 14:15 傻强 阅读(773) 评论(1) 推荐(0)

[转贴]C# 2.0:使用匿名方法、迭代程序和局部类来创建优雅的代码
摘要:C# 2.0:使用匿名方法、迭代程序和局部类来创建优雅的代码 阅读全文

posted @ 2005-05-09 13:47 傻强 阅读(271) 评论(0) 推荐(0)

提高反射的调用性能
摘要:都说Reflection的性能相当差,但是非用不可的时候也得用,下面是提高反射效率的一个办法。 要被反射调用的类都实现一个接口,调用的那个类引用这个接口,将反射得来的类都转换为这个接口,然后直接调用,没有必要所有的方法都反射。 公用的接口 namespaceCommonInterface { /**//// ///公用的接口 /// ... 阅读全文

posted @ 2005-04-14 12:02 傻强 阅读(1285) 评论(2) 推荐(1)

不要用抛出异常来代替返回值
摘要:看这篇文章 Exception对程序执行效率的影响 阅读全文

posted @ 2005-04-12 16:59 傻强 阅读(438) 评论(0) 推荐(0)