 | ReflectionUtilsCallMethod Method (Object, String, Type, Object) |
Calls a method on an object dynamically. This version requires explicit
specification of the parameter type signatures.
Namespace:
Koden.Utils
Assembly:
Koden.Utils (in Koden.Utils.dll) Version: 1.1.6453.26060
Syntaxpublic static Object CallMethod(
Object instance,
string method,
Type[] parameterTypes,
params Object[] parms
)
Public Shared Function CallMethod (
instance As Object,
method As String,
parameterTypes As Type(),
ParamArray parms As Object()
) As Object
public:
static Object^ CallMethod(
Object^ instance,
String^ method,
array<Type^>^ parameterTypes,
... array<Object^>^ parms
)
static member CallMethod :
instance : Object *
method : string *
parameterTypes : Type[] *
parms : Object[] -> Object
Parameters
- instance
- Type: SystemObject
Instance of object to call method on - method
- Type: SystemString
The method to call as a stringToTypedValue - parameterTypes
- Type: SystemType
Specify each of the types for each parameter passed.
You can also pass null, but you may get errors for ambiguous methods signatures
when null parameters are passed - parms
- Type: SystemObject
any variable number of parameters.
Return Value
Type:
Objectobject
See Also