Edit

Share via


HttpClientChannel.Item[Object] Property

Definition

Returns the specified channel property.

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

Parameters

key
Object

The key of the channel property to retrieve.

Property Value

A Object that represents the channel property specified by key.

Examples

The following code example shows how to use the Item[] property. This code example is part of a larger example provided for the HttpClientChannel class.

// 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]);
}

Applies to