TcpChannel.ChannelName Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the name of the current channel.

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

public string ChannelName {
	[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure, 
		Infrastructure = true)]

Property Value

Type: System.String

A String that contains the name of the channel.

Every registered channel has a unique name. The name is used to retrieve a specific channel when calling GetChannel. To set the ChannelName property, assign the value to the "name" indexed property in the dictionary passed to the TcpChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider) constructor.

The following code example shows how to use this property.

// Show the name of the channel.
Console.WriteLine("The name of the channel is {0}.", 

.NET Framework
Available since 1.1
Return to top