HI,
I am trying to invoke a method via reflection with parameters with parameter value.
I have used below code:
var methodInfo = propertyInfo.GetMethod(propertyOrMethodName);
propertyValue = methodInfo?.Invoke(CreateInstance, methodInfo.GetParameters());
it is giving error :
System.ArgumentException: 'Object of type 'System.Reflection.RuntimeParameterInfo' cannot be converted to type 'System.Boolean'.'
I want to access parameter value at run time.
Any help will be appreciated.
Regards
Shweta