c#中得remoting
c#中remoting 注册了通道怎么注销掉啊
--------------------编程问答-------------------- //获得当前已注册的通道;
IChannel[] channels = ChannelServices.RegisteredChannels;
//关闭指定名为MyTcp的通道;
foreach (IChannel eachChannel in channels)
{
if (eachChannel.ChannelName == "MyTcp")
{
TcpChannel tcpChannel = (TcpChannel)eachChannel;
//关闭监听;
tcpChannel.StopListening(null);
//注销通道;
ChannelServices.UnregisterChannel(tcpChannel);
}
} --------------------编程问答-------------------- 顶一楼 --------------------编程问答-------------------- 同意一楼的代码
补充:.NET技术 , C#