Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Last active October 16, 2019 01:15
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/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