1
NullReferenceException을 추적하고 있는데 the official documentation이 부족합니다.C# 2.0 : MethodBase.GetCurrentMethod()가 null을 반환 할 수 있습니까?
이것은 C# 2.0 코드입니다.
NullReferenceException을 추적하고 있는데 the official documentation이 부족합니다.C# 2.0 : MethodBase.GetCurrentMethod()가 null을 반환 할 수 있습니까?
이것은 C# 2.0 코드입니다.
반사판을 보면, 그것이 할 수있는 다음과 같습니다
internal static MethodBase InternalGetCurrentMethod(ref StackCrawlMark stackMark)
{
RuntimeMethodHandle currentMethod = RuntimeMethodHandle.GetCurrentMethod(ref stackMark);
if (currentMethod.IsNullHandle())
{
return null;
}
return RuntimeType.GetMethodBase(currentMethod.GetTypicalMethodDefinition());
}
감사 :
및
InternalGetCurrentMethod
처럼 보인다! 아마도 Reflector를 설치해야 할 것입니다. – emptyset