IpcChannel.ChannelName 属性
定义
获取当前信道的名称。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
属性值
一个 String 包含信道名称。A String that contains the name of the channel.
实现
示例
下面的代码示例说明如何使用 ChannelName 属性。The following code example shows how to use the ChannelName property. 此代码示例是为类提供的更大示例的一部分 IpcChannel 。This code example is part of a larger example provided for the IpcChannel class.
// Show the name of the channel.
Console::WriteLine( L"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);
注解
每个已注册的通道都具有唯一的名称。Every registered channel has a unique name. 此名称用于在调用时检索特定通道 GetChannel 。The name is used to retrieve a specific channel when calling GetChannel. 默认名称为 "ipc"。The default name is "ipc".