Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PresenterAndController
- {
- public void Control()
- {
- Present();
- }
- public void Present()
- {
- // present something
- }
- }
- internal class Presenter
- {
- public void Present()
- {
- // present something
- }
- }
- class PresenterAndController : Presenter
- {
- public void Control()
- {
- Present();
- }
- }
- internal class Presenter
- {
- public void Present()
- {
- // present something
- }
- }
- class PresenterAndController : Presenter
- {
- private Presenter myPresenter;
- public void Present() // hides base method
- {
- myPresenter.Present();
- }
- public void Control()
- {
- Present(); // it now references method from this type
- }
- }
Add Comment
Please, Sign In to add comment