Share via


HttpClientChannel.Item[Object] Propriedade

Definição

Retorna a propriedade de canal especificada.

public:
 virtual property System::Object ^ default[System::Object ^] { System::Object ^ get(System::Object ^ key); void set(System::Object ^ key, System::Object ^ value); };
public override object this[object key] { get; set; }
member this.Item(obj) : obj with get, set
Default Public Overrides Property Item(key As Object) As Object

Parâmetros

key
Object

A chave da propriedade de canal a recuperar.

Valor da propriedade

Um Object que representa a propriedade de canal especificada por key.

Exemplos

O exemplo de código a seguir mostra como usar a Item[] propriedade . Este exemplo de código faz parte de um exemplo maior fornecido para a HttpClientChannel classe .

// Display the channel's properties using Keys and Item.
for each(String^ key in clientChannel->Keys)
{
    Console::WriteLine("clientChannel[{0}] = <{1}>", key, clientChannel[key]);
}
// Display the channel's properties using Keys and Item.
foreach(string key in clientChannel.Keys)
{
    Console.WriteLine(
        "clientChannel[{0}] = <{1}>",
        key, clientChannel[key]);
}

Aplica-se a