Partager via


HttpChannel.Item[Object] Propriété

Définition

Retourne la propriété de canal spécifiée.

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

Paramètres

key
Object

Clé de la propriété de canal à récupérer.

Valeur de propriété

Object qui représente la propriété de canal spécifiée par key.

Exemples

L'exemple de code suivant montre comment utiliser la propriété Item[]. Cet exemple de code fait partie d’un exemple plus grand fourni pour la 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]);
}

S’applique à