Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created November 7, 2022 03:34
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 IntegerMan/f6f86c95e2f48248c284c1f9230c55a2 to your computer and use it in GitHub Desktop.
Save IntegerMan/f6f86c95e2f48248c284c1f9230c55a2 to your computer and use it in GitHub Desktop.
public void WithdrawMoney(decimal amount)
{
if (amount <= 0)
{
throw new ArgumentOutOfRangeException(nameof(amount), amount, "The amount to withdraw must be positive");
}
// Actual withdraw code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment