关于Remoting的一点不解
我看了一些程序:
比如:
RemoteObj.cs //远程对象
Server.cs //服务端程序,就是远程对象的宿主
Client.cs //客户端程序
在编译时:
csc /t:library RemoteObj.cs //生成RemoteObj.dll
csc /r:RemoteObj.dll Server.cs //生成Server.exe
csc /r:RemoteObj.dll Client.cs //生成Client.exe
我不清楚:
Client端是通过Server端访问远程RemoteObj对象的。可是看上面的编译过程是把RemoteObj.dll引入到Client.cs来编译的。那么Client端执行RemoteObj中方法应该是本地的RemoteObj对象,而不是远程的RemoteObj对象。这该怎么解释?