ModuleBuilder.GetCustomAttributesData 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳已套用於當前 ModuleBuilder物件的 CustomAttributeData 屬性資訊。
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 。
備註
使用此方法檢視僅反映上下文中程式碼的自訂屬性,當自訂屬性本身已定義於載入僅反射上下文的程式碼中時。 像 Attribute.GetCustomAttributes 和 Assembly.GetCustomAttributes 這類方法無法用於此類情況,因為它們會建立屬性的實例。 僅在反射上下文中無法執行程式碼。 如需更多資訊及例如程式碼,請參閱該類別。CustomAttributeData