Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ReflectionUtils.GetMethod Method

Returns method for the specified Type, method name and argument Types.

[Visual Basic]
Public Shared Sub GetMethod( _
   ByVal targetType As Type, _
   ByVal method As String, _
   ByVal argumentTypes As Type _
)
[C#]
public static MethodInfo GetMethod(
   Type targetType,
   string method,
   Type[] argumentTypes
);

Parameters

targetType
The target Type to find the method on.
method
The method to find.
argumentTypes
The argument Types. May be a null reference (Nothing in Visual Basic) if the method has no arguments.

Return Value

The target method.

Remarks

Searches with BindingFlags

When dealing with interface methods, you probable want to 'normalize' method references by calling MapInterfaceMethodToImplementationIfNecessary.

See Also

ReflectionUtils Class | Spring.Util Namespace | MapInterfaceMethodToImplementationIfNecessary