Hi there, I am using reflection and calling System.Activator.CreateInstance with a ParameterInfo.ParameterType as a parameter. The value of ParameterInfo.ParameterType is {System.String}. However, this calls raises a MissingMethodException.
So if I understand correctly, you are trying to call System.Activator.CreateInstance(<String>) using reflection and passing an object of type ParameterInfo as a parameter. But if you are trying to actually call the CreateInstance method, it will need the actual values of the parameters, not just the types. So, .NET is trying to find the method System.Activator.CreateInstance(<ParameterInfo>), and that method doesn't exist. Instead of passing a ParameterInfo, just pass the actual String that you want to use.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.