Click here to Skip to main content
15,881,204 members
Articles / Programming Languages / C# 3.0
Alternative
Tip/Trick

Filtering records from List similar to Sql IN Operator using LINQ

Rate me:
Please Sign up or sign in to vote.
4.67/5 (2 votes)
27 Feb 2012CPOL 8.5K   1   1
An alternate solution.

Couldn't you just say something like this?


C#
allReleaseAttachments.Where(s => allExtensions.Contains(s.Path.SubString(extensionStartIndex))?

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralReason for my vote of 2 seen this before. Pin
Dean Oliver27-Feb-12 6:07
Dean Oliver27-Feb-12 6:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.