this.richtextbox1.appendtext(b.showother(a)+"\n");
this.richtextbox1.appendtext(a.showother(b)+"\n\n\n");
this.richtextbox1.appendtext(a.gettype().tostring()+"\n");
this.richtextbox1.appendtext(b.gettype().tostring()+"\n");
}
为了清楚的说明问题我们在生成的对象中使用了showself和showother的方法用来显示自己和另外一个对象。
如要查看书中该例子的c#实现请到这里: