在 Remoting 中使用 Event 主要是为了实现 CallBack 机制,让服务器在接收到某个 "消息" 时,主动调用某个或多个客户端的方法。 我们先看一个例子。 using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using System.Runtime.Serialization.Formatters; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; namespace Learn.Library.Remoting