score:8
Accepted answer
How about:
const string xmlNamespace = "{http://schemas.microsoft.com/developer/msbuild/2003}";
return from projectPath in projectPaths
let xml = XDocument.Load(projectPath)
let dir = Path.GetDirectoryName(projectPath)
from c in xml.Descendants(xmlNamespace + "Compile")
where c.Attribute("Include").Value.EndsWith(".cs")
select Path.Combine(dir, c.Attribute("Include").Value);
Source: stackoverflow.com
Related Query
- How can I combine this code into one or two LINQ queries?
- Can I make this two LINQ queries into one query only?
- How can I merge two LINQ queries into one query?
- How do I combine these two linq queries into a single query?
- How do I combine multiple linq queries into one results set?
- How to use LINQ to combine two or more collections into one collection
- How can I combine .Select from two LINQ expressions into one?
- How can I code numerous MIN functions into one LINQ to DataSet query
- A better way to combine two Linq Queries into one in MVC5 Controller
- How can I combine these linq queries into one?
- How can i convert this code snippet into LINQ format?
- How can i combine two object fields in Object List into one DropDown in mvc
- How to combine this foreach loop into a one line lambda / linq
- how to combine two linq query into one in c#
- How can I convert this SQL Query into LINQ (OVER (PARTITION BY Date))
- How to combine multiple fields into one field using LINQ
- How can I use LINQ to project this parent and children object model into a flat, single object?
- How to Combine two Sum operations into one using LINQ?
- Combine two LINQ queries from different sources into single object
- How can I merge two Linq IEnumerable<T> queries without running them?
- How can I split a List<T> into two lists, one containing all duplicate values and the other containing the remainder?
- How can I further simplify this piece of LINQ code
- Is there a way to combine two LINQ queries into one?
- C# Combine two lists with nested lists into one using LINQ
- How can I turn this 12-line method into a 1-line LINQ expression?
- How can I make this LINQ search method handle more than two terms?
- Is there a way to combine these two LINQ statements into one
- Combine two counting queries into one Boolean query
- How to combine Mapping Tables classes into one class using LINQ
- This LINQ statement crashes if one of the Properties is NULL. How can I fix this?
More Query from same tag
- RavenDB query with Linq and enum
- Linq Cannot implicitity Convert DateTime,Double
- I want to use LINQ to extract the strings that match the class property strings and the strings in the prepared list
- LINQ Convert Dictionary to Lookup
- Combine streams with maximum time interval between values
- IGrouping does not contain a definition for Sum
- How do I get the index of the highest value in an array using LINQ?
- Linq over generic class with generic property
- How to chunk dictionary by Linq in C#?
- EF6 - Correct SQL output but data does not populate
- Subquery with joins in LINQ
- How do I order a group result with a list, in Linq?
- How to get a flattened list back to breezejs through webapi2?
- Select a table column from IEnumerable using Linq
- LINQ Strange SQL Output
- LINQ sum not performed when values are identical
- Method not found: 'Void LinqKit.Extensions.ForEach
- LINQ OrderBy Clause - Force certain string to always be at the top
- MVC Core Compare PagedList vs OrderBy Skip Take
- Get empty slot with lowest index from an array
- LinqToSql Query return time too performance too long
- One To Many LINQ Joins Across Nested Collections
- How do I merge two count queries from one table?
- How to read a section from web.config on IIS7 w/ .net 4 in C#
- LINQ Expression Building get property and convert to type
- LINQ: Sum values of XML nodes in C#
- Declaring list with anonymous type
- Should I be using a Dictionary or List with a linq search?
- How to filter with Linq
- Using Linq Indexof StartIndex without materialization