摘要: 反射 : Reflection1. 基类调用派生类时候用2. 在运行时才确定要调用哪个类的时候用3. 在运行期 获取 模块 程序集 类 构造函数 属性方法的信息 以及实例化类,调用构造函数,属性,方法,事件,委托等……通过对类型动态实例化后,还可以用反射对其执行操作4. 如果在写代码的时候就能确定要 阅读全文
posted @ 2013-08-11 16:47 hobby0524 阅读(176) 评论(0) 推荐(0) 编辑
摘要: try catch finally与return的执行顺序 测试1: public static int test1() { int i = 1; try { return ++i; } finally { ++i; Console.WriteLine("finally:" + i); } } st 阅读全文
posted @ 2013-08-11 14:42 hobby0524 阅读(149) 评论(0) 推荐(0) 编辑