共用方式為


IDebugCustomAttributeQuery2::IsCustomAttributeDefined

判斷自定義屬性是否存在依名稱。

語法

int IsCustomAttributeDefined(
   [In] string pszCustomAttributeName
);

參數

pszCustomAttributeName
[in]字串,包含要尋找的自定義屬性名稱。

傳回值

如果自定義屬性在此欄位上定義,則傳回S_OK,否則會傳回S_FALSE。

備註

若要取得與自定義屬性相關聯的屬性位元組,請呼叫 GetCustomAttributeByName 方法。

另請參閱