Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Post
- {
- public string Title { get; set; }
- public string Description { get; set; }
- private DateTime _whenCreated;
- private int _voteValue;
- public Post()
- {
- _whenCreated = DateTime.Now;
- _voteValue = 0;
- }
- public void UpVote()
- {
- _voteValue++;
- }
- public void DownVote()
- {
- _voteValue--;
- }
- public int GetVoteValue()
- {
- return _voteValue;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement