在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
.Net对于远程调用提供了两种方法:Remoting和WebService。
1namespace RemoteSample
2}
将其编译为一个lib文件:csc /t:library RemoteObject.cs
1using System;
2using System.Runtime; 3using System.Runtime.Remoting; 4using System.Runtime.Remoting.Channels; 5using System.Runtime.Remoting.Channels.Tcp; 6using RemoteSample; 7 8namespace RemoteSampleServer 9}
将其编译为一个exe文件:csc /r:System.Runtime.Remoting.dll /r:RemoteObject.dll RemoteServer.cs
1using System;
2using System.Runtime.Remoting; 3using System.Runtime.Remoting.Channels; 4using System.Runtime.Remoting.Channels.Tcp; 5using RemoteSample; 6 7namespace RemoteSampleClient 8}
同样的,将其编译为exe文件:csc /r:System.Runtime.Remoting.dll /r:RemoteObject.dll RemoteClient.cs From : http://www.cnblogs.com/game-over/archive/2007/10/08/917470.html |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论