Document Library for WPF | ComponentOne
C1.WPF.Document.4.6.2 Assembly / C1.WPF.Document Namespace / Utils Class / GetMethod Method
Represents type declarations: class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types.
The string containing the name of the method to get.
A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. -or- Zero, to return null.
An array of System.Type objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of System.Type objects (as provided by the System.Type.EmptyTypes field) to get a method that takes no parameters.

In This Topic
    GetMethod Method
    In This Topic
    Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints.
    Syntax
    'Declaration
     
    Public Shared Function GetMethod( _
       ByVal type As Type, _
       ByVal name As String, _
       ByVal bindingFlags As BindingFlags, _
       ByVal paramTypes() As Type _
    ) As MethodInfo
    public static MethodInfo GetMethod( 
       Type type,
       string name,
       BindingFlags bindingFlags,
       Type[] paramTypes
    )

    Parameters

    type
    Represents type declarations: class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types.
    name
    The string containing the name of the method to get.
    bindingFlags
    A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. -or- Zero, to return null.
    paramTypes
    An array of System.Type objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of System.Type objects (as provided by the System.Type.EmptyTypes field) to get a method that takes no parameters.

    Return Value

    An object representing the method that matches the specified requirements, if found; otherwise, null.
    See Also