AssemblyBuilder.GetCustomAttributesData 方法

定义

返回 CustomAttributeData 对象,这些对象包含已应用到当前 AssemblyBuilder 的特性的相关信息。

public:
 override System::Collections::Generic::IList<System::Reflection::CustomAttributeData ^> ^ GetCustomAttributesData();
public override System.Collections.Generic.IList<System.Reflection.CustomAttributeData> GetCustomAttributesData ();
override this.GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
Public Overrides Function GetCustomAttributesData () As IList(Of CustomAttributeData)

返回

CustomAttributeData 对象的泛型列表,表示已应用到当前模块的特性的相关数据。

注解

如果自定义属性本身是在加载到仅反射上下文中的代码中定义的,则使用此方法检查仅反射上下文中的代码的自定义属性。 在这种情况下,不能使用 和 Assembly.GetCustomAttributesAttribute.GetCustomAttributes方法,因为它们会创建特性的实例。 无法执行仅反射上下文中的代码。 有关详细信息和示例代码,请参阅 CustomAttributeData 类。

适用于