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

◆ CreateDelegateInternal()

Delegate System.Reflection.RuntimeMethodInfo.CreateDelegateInternal ( Type delegateType,
object firstArgument,
DelegateBindingFlags bindingFlags )
inlineprivate

Definition at line 527 of file RuntimeMethodInfo.cs.

528 {
529 if (delegateType == null)
530 {
531 throw new ArgumentNullException("delegateType");
532 }
533 RuntimeType runtimeType = delegateType as RuntimeType;
534 if (runtimeType == null)
535 {
536 throw new ArgumentException(SR.Argument_MustBeRuntimeType, "delegateType");
537 }
538 if (!runtimeType.IsDelegate())
539 {
540 throw new ArgumentException(SR.Arg_MustBeDelegate, "delegateType");
541 }
542 Delegate @delegate = Delegate.CreateDelegateInternal(runtimeType, this, firstArgument, bindingFlags);
543 if ((object)@delegate == null)
544 {
545 throw new ArgumentException(SR.Arg_DlgtTargMeth);
546 }
547 return @delegate;
548 }

References System.SR.Arg_DlgtTargMeth, System.SR.Arg_MustBeDelegate, System.SR.Argument_MustBeRuntimeType, and System.Delegate.CreateDelegateInternal().

Referenced by System.Reflection.RuntimeMethodInfo.CreateDelegate(), and System.Reflection.RuntimeMethodInfo.CreateDelegate().