Partager via


Type.InvokeMember Method

Invokes the specified member by using the specified binding constraints (flags) and matching the specified argument list.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

[DebuggerHiddenAttribute]
[DebuggerStepThroughAttribute]
[MethodImplAttribute]
public Object InvokeMember (
         stringname,
         BindingFlagsinvokeAttr,
         Binderbinder,
         Objecttarget,
         Object[] args
)

Parameters

  • name
    The String object containing the name of the constructor, method, property, or field member you want to invoke.

    -or-

    An empty string ("") to invoke the default member.

  • invokeAttr
    A bitmask containing one or more BindingFlags objects (binding flags) that specify how the search is conducted. You can use such binding flags as Public, NonPublic, Private, InvokeMethod, GetField, among others. You do not need to specify the type of lookup. If you omit the type of lookup, BindingFlags.Public and BindingFlags.Instance will apply by default.

  • binder
    A Binder object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, or invocation of a member through reflection.

    -or-

    A null reference.

  • target
    The Object object on which you want to invoke the specified member.

  • args
    An array containing the arguments to pass to the member you want to invoke.

Return Value

An Object object representing the return value of the invoked member.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Type Class
Type Members
System Namespace