.NET Core / .NET Standard 中的 PropertyInfo.ReflectedType 是什么?

What's the equivalent to PropertyInfo.ReflectedType in .NET Core / .NET Standard?

我需要类似于 PropertyInfo.ReflectedType 在完整框架中所做的事情。

目前我还想不出什么可以替代 PropertyInfo 的整个 属性。

ReflectedType 在 .NET Core 中不受支持,并且 "intentionally excluded" 正如 Microsoft 的人员所说。此 question on github 包含一个 link 博客,解释原因但现在已损坏...

您可以查看 Nunit. Eliminate use of ReflectedType in preparation for ASP .Net 5 support or AutoFixture. Support for CoreCLR 之类的 PR,以了解如何调整您的代码。通常,可行的解决方案是删除所有使用 ReflectedType 属性 的方法,而是保留并使用对获取类型的对象(反射对象)的引用。