AssemblyBuilder.GetCustomAttributesData 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回 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 物件的泛型清單,表示已套用至目前模組之屬性的資料。
備註
使用這個方法可在僅限反映的內容中檢查程式碼的自訂屬性,以防自訂屬性本身是在載入至僅限反映內容的程式碼中定義。 這類 Attribute.GetCustomAttributesAssembly.GetCustomAttributes 方法無法在這類情況下使用,因為它們會建立屬性的實例。 無法執行僅限反映內容中的程式碼。 如需詳細資訊和範例程式碼,請參閱 類別 CustomAttributeData 。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應