Created
June 29, 2020 18:57
-
-
Save controlflow/d7c1a28df211e5d6aa618ea8a2b3eeb9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (arguments[currentIndex].MatchingParameter?.Element.IndexOf() is {} index && index >= 0) | |
// vs. | |
if (arguments[currentIndex].MatchingParameter?.Element.IndexOf() is >= 0 and var index) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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