Method InvokeMethodWithResult
InvokeMethodWithResult(Type?, string, object?, object[]?)
Invokes method with object result through the reflection.
public static object? InvokeMethodWithResult(Type? type, string methodName, object? obj = null, object[]? param = null)
Parameters
type
TypeType where to search the method.
methodName
stringMethod name
obj
objectObject instance. Optional. Default is null.
param
object[]Method parameters. Optional. Default is null.
Returns
- object
null
if method not found; otherwise result of the method invoke.