[]
Searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints.
public static MethodInfo GetMethod(Type type, string name, BindingFlags bindingFlags, Type[] paramTypes)
Type | Name | Description |
---|---|---|
Type | 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. |
string | name | The string containing the name of the method to get. |
BindingFlags | bindingFlags | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. -or- Zero, to return null. |
Type[] | 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. |
Type | Description |
---|---|
MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |