.NET Framework Class Library
ChannelServices..::.RegisteredChannels Property

Gets a list of currently registered channels.

Namespace:  System.Runtime.Remoting.Channels
Assembly:  mscorlib (in mscorlib.dll)
Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Property RegisteredChannels As IChannel()
Visual Basic (Usage)
Dim value As IChannel()

value = ChannelServices.RegisteredChannels
C#
public static IChannel[] RegisteredChannels { get; }
Visual C++
public:
static property array<IChannel^>^ RegisteredChannels {
    array<IChannel^>^ get ();
}
JScript
public static function get RegisteredChannels () : IChannel[]

Property Value

Type: array<System.Runtime.Remoting.Channels..::.IChannel>[]()[]
An array of all the currently registered channels.
Exceptions

ExceptionCondition
SecurityException

The immediate caller does not have infrastructure permission.

Examples

Visual Basic
' 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
C#
// 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);
}
Visual C++
// 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 );

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

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
See Also

Reference

Tags :


Page view tracker