Responder Developer Guide
GetGenericMethod Method


Source type
Binding flags
Name of the method
Generic types to use to make the method generic
Method parameters
Gets a generic method from a type given the method name, binding flags, generic types and parameter types
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Shared Function GetGenericMethod( _
   ByVal sourceType As Type, _
   ByVal bindingFlags As BindingFlags, _
   ByVal methodName As String, _
   ByVal genericTypes() As Type, _
   ByVal parameterTypes() As Type _
) As MethodInfo
'Usage
 
Dim sourceType As Type
Dim bindingFlags As BindingFlags
Dim methodName As String
Dim genericTypes() As Type
Dim parameterTypes() As Type
Dim value As MethodInfo
 
value = TypeExtensions.GetGenericMethod(sourceType, bindingFlags, methodName, genericTypes, parameterTypes)
[Extension()]
public static MethodInfo GetGenericMethod( 
   Type sourceType,
   BindingFlags bindingFlags,
   string methodName,
   Type[] genericTypes,
   Type[] parameterTypes
)

Parameters

sourceType
Source type
bindingFlags
Binding flags
methodName
Name of the method
genericTypes
Generic types to use to make the method generic
parameterTypes
Method parameters

Return Value

MethodInfo or null if no matches found
Exceptions
ExceptionDescription
System.Reflection.AmbiguousMatchException 
System.ArgumentException 
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

TypeExtensions Class
TypeExtensions Members

 

 


Send Comment