Share via


SiteMapNode.Item[String] 屬性

定義

根據指定的索引鍵,取得或設定 Attributes 集合的自訂屬性或資源字串。

public:
 virtual property System::String ^ default[System::String ^] { System::String ^ get(System::String ^ key); void set(System::String ^ key, System::String ^ value); };
public virtual string this[string key] { get; set; }
member this.Item(string) : string with get, set
Default Public Overridable Property Item(key As String) As String

參數

key
String

字串,識別要擷取的屬性或資源字串。

屬性值

key 所識別的自訂屬性或資源字串,否則為 null

例外狀況

節點為唯讀。

備註

屬性 Item[] 是索引子,會先判斷追蹤 SiteMapNode 物件的提供者是否支援當地語系化。 如果是,則會 Item[] 呼叫

GetImplicitResourceString 方法,傳遞 key 參數。 如果未傳回當地語系化文字,則會 Item[] 呼叫

GetExplicitResourceString 方法。

如果未傳回當地語系化文字,或提供者不支援當地語系化,則會 Item[] 嘗試使用指定的 keyAttributes 集合傳回專案。

適用於

另請參閱