I am trying to pass a complex object (a third-party component) as a parameter to a reflected method. The call to MethodBase.Invoke works properly, but when the actual method itself begins, so does the trouble.
Invariably, at runtime the method throws an exception stating that
As the exception text shows, each type is identical, and there should be no conversion problems. When I call the method without reflection, there are no conversion problems. With reflection, there are no problems with passing native types, i.e. ints and strings.
Can anyone shed some light on this problem?
Thanks!
Invariably, at runtime the method throws an exception stating that
Code:
Object of type 'RGA.Common.Services.FileMoverService.BLL.SecureFTP' cannot be converted to type 'RGA.Common.Services.FileMoverService.BLL.SecureFTP'.
As the exception text shows, each type is identical, and there should be no conversion problems. When I call the method without reflection, there are no conversion problems. With reflection, there are no problems with passing native types, i.e. ints and strings.
Can anyone shed some light on this problem?
Thanks!