Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Task
- {
- public Status Status { get; set; }
- public virtual void Close()
- {
- Status = Status.Closed;
- }
- }
- public class ProjectTask : Task
- {
- public override void Close()
- {
- if (Status == Status.Started)
- { base.Close();
- }
- }
- }
Add Comment
Please, Sign In to add comment