語言

HttpChannel.Item[Object] 屬性

定義

回傳指定的通道特性。

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

參數

key
Object

通道屬性的金鑰要取回。

屬性值

Object代表由 key所指定的通道性質的 A。

範例

以下程式碼範例說明如何使用該 Item[] 屬性。 此程式碼範例是本類別更大範例 HttpClientChannel 的一部分。

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

適用於