ASP编程 PHP编程 JSP编程 NET编程 CGI编程 XML编程 
Google adsense申请技巧本站核心代理域名注册主机业务 快速发布你的买卖域名买卖网站信息 1元注册 cn域名
站长每日新闻导读 √ ·推荐万网空间¥120元 150m 站长网:站长必上的网站网站联盟大全本站代理万网域名55空间120元
 2006-12-26 09:50:35

一个简单的.net remoting客户端例子

来源: 字体:[ ]

一个简单的.net remoting客户端例子
public static void Main()
{
      RemotingConfiguration.Configure("Client.exe.config");
      RemotableType type1 = new RemotableType();
      type1.StringMethod();
}
对应的IL为:
.method public hidebysig static void Main() cil managed
{
      .entrypoint
      // Code Size: 24 byte(s)
      .maxstack 1
      .locals (
            [RemotableType]RemotableType type1)
      L_0000: ldstr "Client.exe.config"
      L_0005: call void [mscorlib]System.Runtime.Remoting.
RemotingConfiguration::Configure(string)
      L_000a: newobj instance void [RemotableType]RemotableType::.ctor()
      L_000f: stloc.0 
      L_0010: ldloc.0 
      L_0011: callvirt instance string [RemotableType]RemotableType::StringMethod()
      L_0016: pop 
      L_0017: ret 
}
newobj将会调用ActivationServices.IsCurrentContextOK()
callvirt将会调用RealProxy.PrivateInvoke()

网站地图 - 域名注册续费虚拟主机代理 - 交易论坛 - 网站投稿 - 广告服务 - 帮助中心 - 联系我们
Copyright ©2003-2007 www.Admin5.com All Rights Reserved