Muokkaa

Jaa


TcpChannel.ChannelName Property

Definition

Gets the name of the current channel.

public:
 property System::String ^ ChannelName { System::String ^ get(); };
public string ChannelName { get; }
member this.ChannelName : string
Public ReadOnly Property ChannelName As String

Property Value

A String that contains the name of the channel.

Implements

Examples

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}.", 
    serverChannel->ChannelName);
// Show the name of the channel.
Console.WriteLine("The name of the channel is {0}.",
    serverChannel.ChannelName);

Remarks

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.

Applies to