Click here to Skip to main content
15,123,727 members
Articles / Programming Languages / C# 3.0
Alternative
Tip/Trick
Posted 27 Feb 2012

Tagged as

Stats

7.7K views
1 bookmarked

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
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)

Share

About the Author

Greg Sipes
United States United States
No Biography provided

Comments and Discussions

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

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.