您当前的位置:中客资源站网络学院.NET专区综合应用 → 文章内容 退出登录 用户管理
本类热门文章
相关下载
一个简单的.net remoting客户端例子
作者:中客资源  来源:中客资源  发布时间:2007-2-7 2:55:32

减小字体 增大字体

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()


[] [返回上一页] [打 印]
文章评论 (评论内容只代表网友观点,与本站立场无关!)

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码