// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Tcp; using X.Common; namespace X.Client { // test client klasse class XClient { public static void Main(string[] args) { // test ChannelServices.RegisterChannel(new TcpClientChannel()); IX a = (IX)Activator.GetObject(typeof(IX), "tcp://localhost:50000/A"); Console.WriteLine(a.WhoAmI()); IX b = (IX)Activator.GetObject(typeof(IX), "tcp://localhost:50000/B"); Console.WriteLine(b.WhoAmI()); } } }