Created
October 17, 2020 04:29
-
-
Save MelbourneDeveloper/871ef53e134de15e61ca5d2fb740b794 to your computer and use it in GitHub Desktop.
Get Filtered Strings with Predicate
This file contains 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
public IList<string> GetFilteredStrings() | |
{ | |
Func<string, bool> predicate = a => a.Length == 1; | |
return new List<string> { "321", "21", "1" }.Where(predicate).ToList(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment