Bagikan melalui


HttpClientChannel.Keys Properti

Definisi

ICollection Mendapatkan kunci yang terkait dengan properti saluran.

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

Nilai Properti

Kunci ICollection yang terkait dengan properti saluran.

Contoh

Contoh kode berikut menunjukkan cara menggunakan Keys properti . Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk HttpClientChannel kelas .

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

Keterangan

Properti saluran digunakan untuk mengonfigurasi saluran pada durasi. Untuk daftar properti saluran yang mungkin dan contohnya, lihat Properti Konfigurasi Saluran dan Formatter.

Berlaku untuk

Lihat juga