SiteMapNode.Item[String] Propriedade
Definição
Obtém ou define um atributo personalizado da coleção Attributes ou de uma cadeia de caracteres de recurso com base na chave especificada.Gets or sets a custom attribute from the Attributes collection or a resource string based on the specified key.
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
Parâmetros
- key
- String
Uma cadeia de caracteres que identifica o atributo ou a cadeia de caracteres de recurso a ser recuperada.A string that identifies the attribute or resource string to retrieve.
Valor da propriedade
Um atributo personalizado ou uma cadeia de caracteres de recurso identificada por key ; caso contrário, null .A custom attribute or resource string identified by key; otherwise, null.
Exceções
O nó é somente leitura.The node is read-only.
Comentários
A Item[] propriedade é um indexador que determina primeiro se o provedor que rastreia o SiteMapNode objeto dá suporte à localização.The Item[] property is an indexer that first determines whether the provider that tracks the SiteMapNode object supports localization. Nesse caso, o Item[] chama oIf so, the Item[] calls the
GetImplicitResourceString , passando o key parâmetro.GetImplicitResourceString method, passing the key parameter. Se nenhum texto localizado for retornado, o Item[] chamará oIf no localized text is returned, the Item[] calls the
Método GetExplicitResourceString.GetExplicitResourceString method.
Se nenhum texto localizado for retornado ou se o provedor não oferecer suporte à localização, as Item[] tentativas de retornar um elemento da Attributes coleção, usando o especificado key .If no localized text is returned, or if the provider does not support localization, the Item[] attempts to return an element from the Attributes collection, using the specified key.