共用方式為


ChannelServices.RegisteredChannels 屬性

定義

取得目前已登錄通道的清單。

public:
 static property cli::array <System::Runtime::Remoting::Channels::IChannel ^> ^ RegisteredChannels { cli::array <System::Runtime::Remoting::Channels::IChannel ^> ^ get(); };
public static System.Runtime.Remoting.Channels.IChannel[] RegisteredChannels { get; }
public static System.Runtime.Remoting.Channels.IChannel[] RegisteredChannels { [System.Security.SecurityCritical] get; }
static member RegisteredChannels : System.Runtime.Remoting.Channels.IChannel[]
[<get: System.Security.SecurityCritical>]
static member RegisteredChannels : System.Runtime.Remoting.Channels.IChannel[]
Public Shared ReadOnly Property RegisteredChannels As IChannel()

屬性值

所有目前已登錄通道的陣列。

屬性

例外狀況

立即呼叫端沒有基礎結構使用權限。

範例

// Retrieve and print information about the registered channels.
array<IChannel^>^myIChannelArray = ChannelServices::RegisteredChannels;
for ( int i = 0; i < myIChannelArray->Length; i++ )
{
   Console::WriteLine( "Name of Channel: {0}", myIChannelArray[ i ]->ChannelName );
   Console::WriteLine( "Priority of Channel: {0}", myIChannelArray[ i ]->ChannelPriority );

}
// Retrieve and print information about the registered channels.
IChannel[] myIChannelArray = ChannelServices.RegisteredChannels;
for (int i=0; i<myIChannelArray.Length; i++)
{
   Console.WriteLine("Name of Channel: {0}", myIChannelArray[i].ChannelName);
   Console.WriteLine("Priority of Channel: {0}",
      +myIChannelArray[i].ChannelPriority);
}
' Retrieve and print information about the registered channels.
Dim myIChannelArray As IChannel() = ChannelServices.RegisteredChannels
Dim i As Integer
For i = 0 To myIChannelArray.Length - 1
   Console.WriteLine("Name of Channel: {0}", myIChannelArray(i).ChannelName)
   Console.WriteLine("Priority of Channel: {0}", + myIChannelArray(i).ChannelPriority)
Next i

適用於