/* remoting server example */ using System; namespace rtest { public class bigobject : MarshalByRefObject // needed for call by ref remoting { private int x; public bigobject() { x = 2; } // server-activated, can't have params public int getx() { return x; } public void setx(int y) { x = y; } public void addobj(bigobject that) { this.x += that.getx(); that.setx(99); } } } // rtest // compile with csc /t:library /out:bigobject.dll bigobject.cs