Skip to content

Instantly share code, notes, and snippets.

@controlflow
Created July 12, 2020 14:42
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 controlflow/4dd1b7294f9e4c7529eda7d8fe1e908f to your computer and use it in GitHub Desktop.
Save controlflow/4dd1b7294f9e4c7529eda7d8fe1e908f to your computer and use it in GitHub Desktop.
var parameter = parameterInstance.Element;
if (parameter.Kind != ParameterKind.VALUE
&& parameter.Kind != ParameterKind.REFERENCE) return;
var parameter = parameterInstance.Element;
if (parameter.Kind is not (ParameterKind.VALUE or ParameterKind.REFERENCE)) return;
@controlflow
Copy link
Author

if (x == 1 || x == 2) { }

if (x is 1 or 2) { }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment