Created
November 7, 2022 03:34
-
-
Save IntegerMan/f6f86c95e2f48248c284c1f9230c55a2 to your computer and use it in GitHub Desktop.
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
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