Skip to content

Instantly share code, notes, and snippets.

@MelbourneDeveloper
Created October 17, 2020 04:29
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 MelbourneDeveloper/871ef53e134de15e61ca5d2fb740b794 to your computer and use it in GitHub Desktop.
Save MelbourneDeveloper/871ef53e134de15e61ca5d2fb740b794 to your computer and use it in GitHub Desktop.
Get Filtered Strings with Predicate
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