Skip to content

Instantly share code, notes, and snippets.

@controlflow
Created Jun 29, 2020
Embed
What would you like to do?
if (arguments[currentIndex].MatchingParameter?.Element.IndexOf() is {} index && index >= 0)
// vs.
if (arguments[currentIndex].MatchingParameter?.Element.IndexOf() is >= 0 and var index)
var argumentsMax = TryGetMethodArgumentAbstractValues();
if (argumentsMax == null) return null;
if (argumentsMax.Count != 2) return null;
// vs
var argumentsMax = TryGetMethodArgumentAbstractValues();
if (argumentsMax is null or { Count: not 2 }) return null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment