Created
February 8, 2021 08:49
-
-
Save mttchpmn/490169908aca5b4e249d8153f1eb1e5b to your computer and use it in GitHub Desktop.
C# Post Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Sandbox | |
{ | |
public class Post | |
{ | |
public string Title { get; set; } | |
public string Description { get; set; } | |
public DateTime CreatedAt { get; set; } | |
public int Score { get; private set; } | |
public void UpVote() => Score++; | |
public void DownVote() => Score--; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment