'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.