語言

TcpClientChannel.ChannelPriority 屬性

定義

獲得當前頻道的優先權。

public:
 property int ChannelPriority { int get(); };
public int ChannelPriority { get; }
member this.ChannelPriority : int
Public ReadOnly Property ChannelPriority As Integer

屬性值

一個整數代表該通道所分配的優先權。

實作

範例

以下程式碼範例展示了此特性的使用方式。

// Show the name and priority of the channel.
Console::WriteLine( "Channel Name: {0}", clientChannel->ChannelName );
Console::WriteLine( "Channel Priority: {0}", clientChannel->ChannelPriority );
// Show the name and priority of the channel.
Console.WriteLine("Channel Name: {0}", clientChannel.ChannelName);
Console.WriteLine("Channel Priority: {0}", clientChannel.ChannelPriority);

備註

優先權控制競爭用戶端連接特定端點的順序;較高優先權的頻道會先連接,優先權較低的頻道先連接。 預設優先順序為 1;負面優先權是被允許的。

適用於