Guest User

Untitled

a guest
Jan 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public class Task
  2. {
  3. public Status Status { get; set; }
  4.  
  5. public virtual void Close()
  6. {
  7. Status = Status.Closed;
  8. }
  9. }
  10.  
  11. public class ProjectTask : Task
  12. {
  13. public override void Close()
  14. {
  15. if (Status == Status.Started)
  16. { base.Close();
  17. }
  18. }
  19. }
Add Comment
Please, Sign In to add comment