共用方式為


HttpClientChannel.Keys 屬性

定義

取得 ICollection 通道屬性所關聯的一鍵。

public:
 virtual property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };
public override System.Collections.ICollection Keys { get; }
member this.Keys : System.Collections.ICollection
Public Overrides ReadOnly Property Keys As ICollection

屬性值

通道屬性所關聯的鍵數 A ICollection

範例

以下程式碼範例說明如何使用該 Keys 屬性。 此程式碼範例是本類別更大範例 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]);
}

備註

通道屬性用於執行時配置通道。 有關可能通道屬性及範例,請參見 通道與材料配置屬性

適用於

另請參閱