Method InvokeMethodAndLogResult
InvokeMethodAndLogResult(object?, MethodInfo?)
Invokes the specified method on the given instance and logs the result.
public static bool InvokeMethodAndLogResult(object? instance, MethodInfo? method)
Parameters
instanceobjectThe object instance on which the method should be invoked. Can be null for static methods.
methodMethodInfoThe method to invoke. If null or requires parameters, invocation is skipped.
Returns
- bool
trueif the method was successfully invoked and logged; otherwise,false.