Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Last active October 16, 2019 01:15
Show Gist options
  • Save IntegerMan/3afea2a503d4d0a5dfa1dbf047c1f906 to your computer and use it in GitHub Desktop.
Save IntegerMan/3afea2a503d4d0a5dfa1dbf047c1f906 to your computer and use it in GitHub Desktop.
public void DoFoo(int input) {
if (input != 42) {
throw new ArgumentOutOfRangeException(nameof(input), "DoFoo cannot be invoked with a non-42 value");
}
// ...
}
public void DoBar(int input) {
if (input != 42) {
throw new ArgumentOutOfRangeException(nameof(input), "DoBar cannot be invoked with a non-42 value");
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment