摘要:
using System;using System.Reflection;using System.Reflection.Emit;using System.Globalization;public class Test{ private delegate int HelloDelegate(string msg, int ret); public static void Main() { //------------ 创建动态方法 START ---------------------------------- Type[] helloArgs = { typeof(string), typ 阅读全文
posted @ 2011-08-16 23:33
上校
阅读(467)
评论(0)
推荐(0)
摘要:
------------------前言------------------反射性能实在是太恶劣,在通讯系统、数据库系统中已经无法忍受了。于是我在codeproject上找到一篇使用DynamicMethod的替代方法。http://www.codeproject.com/KB/cs/Dynamic_Code_Generation.aspx可是作者实在也太简陋了,目前仅支持FIeld / Property,于是我扩展了。1.支持FIeld / 带参数Constructor / Property / Index2.操作过程和反射过程一摸一样。------------------代码测试结果--- 阅读全文
posted @ 2011-08-16 00:56
上校
阅读(606)
评论(3)
推荐(0)
浙公网安备 33010602011771号