2009-11-25 5 views

답변

2

반사판을 보면, 그것이 할 수있는 다음과 같습니다

internal static MethodBase InternalGetCurrentMethod(ref StackCrawlMark stackMark) 
{ 
    RuntimeMethodHandle currentMethod = RuntimeMethodHandle.GetCurrentMethod(ref stackMark); 
    if (currentMethod.IsNullHandle()) 
    { 
     return null; 
    } 
    return RuntimeType.GetMethodBase(currentMethod.GetTypicalMethodDefinition()); 
} 
+0

감사 :

[MethodImpl(MethodImplOptions.NoInlining)] public static MethodBase GetCurrentMethod() { StackCrawlMark lookForMyCaller = StackCrawlMark.LookForMyCaller; return RuntimeMethodInfo.InternalGetCurrentMethod(ref lookForMyCaller); } 

InternalGetCurrentMethod처럼 보인다! 아마도 Reflector를 설치해야 할 것입니다. – emptyset

관련 문제