score:0
var result =
from file in lof
from prefix in f
where file.path.startswith(prefix)
select file.path; // ...or just file if you want the localopenfile objects
score:1
list<localopenfile> result =
lof.where(file => f.any(prefix => file.path.startswith(prefix)))
.tolist();
Source: stackoverflow.com
Related Query
- Linq query, select everything from one lists property that starts with a string in another list
- Left join on two Lists and maintain one property from the right with Linq
- I'm trying to simplify with linq a statement that takes 2 lists of numbers and subtracts the first one from the second one
- Construct a LINQ query to return an item from a List that is related by one property to other members but which differs by a second property
- linq how to select a parent with a child collection that contains one or many of an array (or list) of values
- How can I set properties on all items from a linq query with values from another object that is also pulled from a query?
- How to check if a string starts with a capital letter in a LINQ query
- C# LINQ Select objects with the same value of one property join values of other
- How can I use linq to return integers in one array that do not match up with an integer property of another array?
- Which LINQ query to select rows from 1 table that are not in another table
- How to Bind Exclude more than one property from a model with linq to sql asp.net mvc
- Linq query to select single string from multiple List<string>
- Is possible with LINQ to extract from an array of objects the value of one property and create a new array?
- How to select multiple columns from dataset into a string list with LinQ
- How can I select using LINQ for an entry that contains a LIST with more than one row?
- C# LINQ : Dynamically create property and values that includes sum of a value from a grouped query
- Linq query how to select last one week data from today's date
- C# Linq Query Selecting all enums that start with String
- Linq select query that uses prior property in calculated field
- Linq query with select needed to get specific properties from a list
- Complex Linq query to select list items with another list property containing a value
- Is there a LINQ statement that can select an object from an enumeration based on a max of one of its properties?
- Returning the result from a linq query but with one value modified
- EF Core Linq Query to Select Rows That Match From a List of Possibilities
- VB.Net Linq with datatables - select from one table what does not exist in the other
- Adding to two different lists from one LINQ query
- C# Linq with datatables - select from one table what does not exist in the other
- How to write a LINQ query to select from a collection with given set of matching IDs
- How to filter linq query based on all of the values of one property from another list
- I have 2 Lists of strings. How do I get a bool that tells me if one lists contains atleast one string from the other list ? (Using Lambda)
More Query from same tag
- How to order a nested Linq object via orderBy
- ASP.NET MVC / C# - Linq and hashed password
- Best way to combine 2 lists
- .Net EF AddRange On List of Objects is Showing as Multiple Queries
- Convert a Model Class Collection to Dictionary based on property as KEY using LINQ C#
- Search within a string for a specific value
- Attempting to obtain properties / fields from an (anonymous class) object linq is creating
- Linq query with many to many relations using entity framework
- query subcollection when key and value are different subcollections - linq
- C# How do i return iGrouping to a list using lambda expression
- Unable to create a constant value of type ''YYY". Only primitive types or enumeration types are supported in this context
- OrderByDescending doesn't work in nested linq statement
- LINQ with joins and a List<GUID>
- LINQ Contains clause - more then one value in criteria
- Get data from with dynamic where argument
- Can GroupBy and concat not be used together?
- Why does VB.NET Linq Lambda work one way but not the other
- using xml parent data in a LINQ select statement
- How to resolve generic repository and use it in a single variable?
- SQL duplicate rows query in Linq
- Flattening a Dictionary of strings
- local variable scope in linq anonymous method ( closure)
- DbSet not seeing LINQ definitions
- How to define this 'var' type formally?
- C# Linq Inner Join
- Use reflection to make dynamic LINQ statements in C#
- C# LINQ append multiple items rather than returning its array
- How to remove a node while preserving its value and child nodes?
- Linq: Nested queries are better than joins, but what if you use 2 nested queries?
- Switching DB Context in LINQ Entity Framework asp.net MVC 5