Export (0) Print
Expand All

ChannelServices.RegisteredChannels Property

Gets a list of currently registered channels.

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

public static IChannel[] RegisteredChannels { get; }

Property Value

Type: System.Runtime.Remoting.Channels.IChannel[]
An array of all the currently registered channels.

ExceptionCondition
SecurityException

The immediate caller does not have infrastructure permission.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Show:
© 2015 Microsoft