MethodBase.从 C# 调用 Web Api

问题描述 投票:0回答:0

我使用Reflection从Web API调用方法,但是在提取构造函数时,它返回一个URL而不是构造函数信息,这会导致在使用

MethodBase.Invoke
时出现错误,并显示以下错误消息:

是否可以通过 Web API 使用反射?

我的代码:

如果我对项目或命名空间中的对象使用反射,它会正确返回信息,并且调用工作正常。

c# asp.net-web-api system.reflection
© www.soinside.com 2019 - 2024. All rights reserved.