CodeTypeMember.CustomAttributes 屬性

定義

取得或設定成員的自訂屬性。Gets or sets the custom attributes of the member.

public:
 property System::CodeDom::CodeAttributeDeclarationCollection ^ CustomAttributes { System::CodeDom::CodeAttributeDeclarationCollection ^ get(); void set(System::CodeDom::CodeAttributeDeclarationCollection ^ value); };
public System.CodeDom.CodeAttributeDeclarationCollection CustomAttributes { get; set; }
member this.CustomAttributes : System.CodeDom.CodeAttributeDeclarationCollection with get, set
Public Property CustomAttributes As CodeAttributeDeclarationCollection

屬性值

CodeAttributeDeclarationCollection,表示成員的自訂屬性。A CodeAttributeDeclarationCollection that indicates the custom attributes of the member.

備註

這個屬性可以用來將中繼資料屬性加入至成員的宣告中。This property can be used to add metadata attributes to the declaration of the member.

警告

此屬性預設為 null,而且在參考之前,應該先檢查內容。This property is null by default and should be checked for content before being referenced.

適用於

另請參閱