Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.24 KB | None | 0 0
  1. public State
  2. {
  3.     public virtual Party()
  4.     {
  5.     }
  6. }
  7.  
  8. public DanceState : State
  9. {
  10.     public override Party()
  11.     {
  12.         base.Party(); // call or not
  13.    
  14.         // do stuff
  15.     }
  16. }
  17.  
  18. int main()
  19. {
  20.     State state = new DanceState();
  21.     state.Party();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement