Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created September 5, 2019 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/328069c0e1fb75f46070ab19b204abbd to your computer and use it in GitHub Desktop.
Save dcomartin/328069c0e1fb75f46070ab19b204abbd to your computer and use it in GitHub Desktop.
public class Balance
{
public Balance(decimal amount, DateTime asOf)
{
Amount = amount;
AsOf = asOf;
}
public decimal Amount { get; private set; }
public DateTime AsOf { get;private set; }
public void Add(decimal value)
{
AsOf = DateTime.UtcNow;
Amount += value;
}
public void Subtract(decimal value)
{
AsOf = DateTime.UtcNow;
Amount -= value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment