static void Main(string[] args) { Number four = new Number(4, null, null); Number six = new Number(6, null, null); Number five = new Number(5, four, six); Number.Display staticShow = new Number.Display(Display.sshow); Display display = new Display(); Number.Display showPrec = new Number.Display(display.showPredecessor); Number.Display showSucc = new Number.Display(display.showSuccessor); Display.show(five.show(staticShow)); Display.show(five.show(showPrec)); Display.show(five.show(showSucc)); Display sdisplay = new SpecialDisplay(); showPrec = new Number.Display(sdisplay.showPredecessor); showSucc = new Number.Display(sdisplay.showSuccessor); Display.show(five.show(showPrec)); Display.show(five.show(showSucc)); //Console.ReadLine(); }
public ushort show(Number.Display showNumbers) { return(showNumbers(this)); }