【问题标题】:Reuse an Object URI in .NET RemotingServices在 .NET RemotingServices 中重用对象 URI
【发布时间】:2015-08-18 15:42:25
【问题描述】:

如果我创建一个对象并使用 RemotingServices 跨 AppDomain 编组它,如下所示:

Object obj = new Object();
RemotingServices.Marshal(obj, null, null);

以后有没有办法使用相同的 URI 编组一个新对象?我想我必须删除第一个对象,但我不知道该怎么做。

【问题讨论】:

    标签: c# .net uri appdomain remoting


    【解决方案1】:

    是的,您需要先断开第一个对象,然后才能通过调用使用相同的 URI 编组一个新对象:

    RemotingServices.Disconnect(obj);
    

    RemotingServices.Disconnect

    【讨论】:

      猜你喜欢
      • 2011-08-09
      • 2018-12-27
      • 1970-01-01
      • 1970-01-01
      • 2017-08-13
      • 2020-06-19
      • 1970-01-01
      • 2018-09-16
      • 2022-01-26
      相关资源
      最近更新 更多