You can do this
widgets2.Where(y=>widget1.Any(z=>z.TypeID==y.TypeID));
Related Contents:
- Count property vs Count() method?
- How to Quickly Remove Items From a List
- Using LINQ to remove elements from a List
- LINQ .Any VS .Exists – What’s the difference?
- Flatten List in LINQ
- How to easily initialize a list of Tuples?
- Select distinct using linq [duplicate]
- Get a list of distinct values in List
- Convert List to List
- Linq select objects in list where exists IN (A,B,C)
- Sort a list from another list IDs
- How to check if IEnumerable is null or empty?
- LINQ: “contains” and a Lambda query
- Check if list contains element that contains a string and get that element
- Check whether an array is a subset of another
- how to check if object already exists in a list
- How can I initialize a C# List in the same line I declare it. (IEnumerable string Collection Example)
- Lists: Count vs Count() [duplicate]
- Checking if a list is empty with LINQ
- How can I get every nth item from a List?
- Elegant way to combine multiple collections of elements?
- Does Distinct() method keep original ordering of sequence intact?
- How to convert IEnumerable to one comma separated string?
- C# Determine Duplicate in List [duplicate]
- Conversion from List to array T[]
- Fastest way to search in a string collection
- Easiest way to Rotate a List in c#
- How to get a distinct list from a List of objects?
- Sort one list by another
- How to find List has duplicate values in List [duplicate]
- Best way to remove multiple items matching a predicate from a .NET Dictionary?
- Differences between IQueryable, List, IEnumerator?
- How to select values within a provided index range from a List using LINQ
- How to get the closest number from a List with LINQ?
- How to get first object out from List using Linq
- Auto-initializing C# lists
- C# Difference between First() and Find()
- filtering a list using LINQ
- LINQ: How to skip one then take the rest of a sequence
- Add items to a collection if the collection does NOT already contain it by comparing a property of the items?
- Difference between IQueryable, ICollection, IList & IDictionary interface
- Remove items of list from another lists with criteria
- C# List – Removing items while looping / iterating [duplicate]
- Using LINQ to convert List to List
- C# Determine if List Has Duplicate
- Find items from a list which exist in another list
- Determine if collection is of type IEnumerable
- linq question: querying nested collections
- Check for any element that exists in two collections
- Inheriting from List