UtilReflectionGetMethod(Object, String, Type) Method
Searches for the target method in the specified object.
Namespace: DevCase.Core.Diagnostics.Assembly.ReflectionAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static MethodInfo GetMethod(
Object obj,
string methodName,
Type[] types
)
Public Shared Function GetMethod (
obj As Object,
methodName As String,
types As Type()
) As MethodInfo
Dim obj As Object
Dim methodName As String
Dim types As Type()
Dim returnValue As MethodInfo
returnValue = UtilReflection.GetMethod(obj,
methodName, types)
public:
static MethodInfo^ GetMethod(
Object^ obj,
String^ methodName,
array<Type^>^ types
)
static member GetMethod :
obj : Object *
methodName : string *
types : Type[] -> MethodInfo
No code example is currently available or this language may not be supported.
- obj Object
-
The source object from which to retrieve the method.
- methodName String
-
The name of the method to search for.
- types Type
-
An array of Type objects representing the number, order, and type of the parameters for the method to get.
You can specify an empty array of Type objects (as provided by the EmptyTypes field)
to get a method that takes no parameters.
MethodInfo
A
MethodInfo instance that represents the resulting method.
This is a code example.
No code example is currently available or this language may not be supported.
Dim types As Type() = {GetType(Integer), GetType(Integer), GetType(Integer), GetType(Integer)}
Dim params As Object() = {Me.Location.X, Me.Location.Y, CInt(Me.Size.Width * 1.5), CInt(Me.Size.Height * 1.5)}
Dim method As MethodInfo = GetMethod(Me, "SetBounds", types)
method.Invoke(Me, params)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.