'System.Type' 不包含 'GenericTypeArguments' 的定义

'System.Type' does not contain a definition for 'GenericTypeArguments'

因为 GenericTypeArguments 属性 已添加到 .NET 4.5

在 .Net 4.0 中是否有这种方法的任何方式或替代方法

在我当前的项目中,我无法使用 .Net 4.5 版。

我想试试this technique

有一种方法 Type.GetGenericTypeArguments 已经用了很久了。我怀疑至少在 大多数 情况下,两者是等价的。我怀疑 属性 只是 .NET 4.5 中反射 API 设计的一部分(使用 TypeInfo 等)。