Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetMethodFromHandle() [1/2]

static ? MethodBase System.Reflection.MethodBase.GetMethodFromHandle ( RuntimeMethodHandle handle)
inlinestaticinherited

Definition at line 110 of file MethodBase.cs.

111 {
112 if (handle.IsNullHandle())
113 {
114 throw new ArgumentException(SR.Argument_InvalidHandle);
115 }
116 MethodBase methodBase = RuntimeType.GetMethodBase(handle.GetMethodInfo());
117 Type type = methodBase?.DeclaringType;
118 if (type != null && type.IsGenericType)
119 {
120 throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGeneric, methodBase, type.GetGenericTypeDefinition()));
121 }
122 return methodBase;
123 }

References System.SR.Argument_InvalidHandle, System.SR.Argument_MethodDeclaringTypeGeneric, System.Reflection.MemberInfo.DeclaringType, System.SR.Format(), System.RuntimeType.GetMethodBase(), System.handle, and System.type.