📄 class1.cs
字号:
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
namespace RemotingHello
{
class RemoteClient
{
[STAThread]
static void Main(string[] args)
{
RemoteObject ;
TcpChannel channel;
channel=new TcpChannel(0);
ChannelServices.RegisterChannel(channel);
remoteObject = (RemoteObject)Activator.GetObject( typeof(RemoteObject),
"tcp://localhost:1234/RemoteHello" );
remoteObject.SayHello();
Console.Read();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -