Skip to content

Instantly share code, notes, and snippets.

@baywet
Created August 5, 2016 18:33
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 baywet/0c6e6307afbd5ed33126a4da01e59795 to your computer and use it in GitHub Desktop.
Save baywet/0c6e6307afbd5ed33126a4da01e59795 to your computer and use it in GitHub Desktop.
small sample to quickly replace the string names of variables when doing defensive programming exceptions by nameof operator usage
ArgumentNullException\("(\w+)"\);
ArgumentNullException(nameof($1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment