For example , in the override method , you could call the base method first , and then add some code that determines what editing changes were made , and displays the list of changes back to the end user as a confirmation 例如在重写方法中,可以先调用基方法,然后添加一些代码,这些代码确定所做的编辑更改,并作为确认向最终用户回显更改列表。
When you override the method , you should normally call the base method as the last step of the overridden method , so that your custom code runs first , and the event is raised last , indicating that the mode change is complete 当重写此方法时,通常应在重写方法的最后一步中调用此基方法,以便自定义的代码先运行,并且在最后引发事件,从而指示模式更改已完成。
In this month s taming tiger , columnist john zukowski explains how to work with enumerated classes and their predefined methods and shows how to add constructors , override methods , and have instance variables 在这个月的“驯服tiger ”技巧文章中,专栏作家john zukowski将解释如何使用枚举类及其预定义方法,同时还将展示如何添加构造函数、覆盖方法,以及拥有实例变量。
And like a perverse magic trick , sometimes the direction you expect is not where you end up - similar to what can happen when you overload or override methods . one of the most powerful features of an object - oriented language is inheritance polymorphism 就象是一个荒谬而又不可思议的戏法,有时您得到的最终结果并不是您所期望的方向这同您在重载方法或者覆盖方法时遇到的情况有些类似。