資源簡介
反射性能優化
代碼片段和文件信息
using?System;
using?System.Reflection;
using?System.Reflection.Emit;
using?System.Collections.Generic;
using?System.Text;
using?System.Diagnostics;
namespace?FastMethodInvoker
{
????public?delegate?object?FastInvokeHandler(object?target?object[]?paramters);
????public?delegate?void?SayHandler(string?word);
????class?Program
????{
????????static?object?InvokeMethod(FastInvokeHandler?invoke?object?target?params?object[]?paramters)
????????{
????????????return?invoke(null?paramters);
????????}
????????static?void?Main(string[]?args)
????????{
????????????Type?t?=?typeof(Person);
????????????MethodInfo?methodInfo?=?t.GetMethod(“Say“);
????????????Person?person?=?new?Person();
????????????string?word?=?“hello“;
????????????Person?p?=?null;
????????????obje
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????940??2006-06-28?11:10??FastMethodInvoker\FastMethodInvoker.sln
?????目錄???????????0??2006-07-05?22:36??FastMethodInvoker\FastMethodInvoker\
?????文件????????1968??2006-06-28?11:10??FastMethodInvoker\FastMethodInvoker\FastMethodInvoker.csproj
?????文件????????6869??2006-07-05?22:35??FastMethodInvoker\FastMethodInvoker\Program.cs
?????目錄???????????0??2006-06-28?11:10??FastMethodInvoker\FastMethodInvoker\Properties\
?????文件????????1294??2006-06-28?11:10??FastMethodInvoker\FastMethodInvoker\Properties\AssemblyInfo.cs
評論
共有 條評論