Adding the result of two Anonymous Type LINQ queries
-
Hi all, Is is possible to add the result of two anonymous LINQ queries together (when the data is gathered from two different data sources), to form a variable that one
foreach
loop can iterate on. For example:var query1 = from x in dataCollection select new { name = x.Name, surname = x.Surname }; var query2 = from x in xmlCollection select new { name = x.Name, surname = x.Surname }; // ADD query1 and query2 ?? foreach (var result in .....
Many thanks in advance, Kind regards,The only programmers that are better C# programmers, are those who look like this -> :bob:
:java: Programm3r My Blog: ^_^
-
Hi all, Is is possible to add the result of two anonymous LINQ queries together (when the data is gathered from two different data sources), to form a variable that one
foreach
loop can iterate on. For example:var query1 = from x in dataCollection select new { name = x.Name, surname = x.Surname }; var query2 = from x in xmlCollection select new { name = x.Name, surname = x.Surname }; // ADD query1 and query2 ?? foreach (var result in .....
Many thanks in advance, Kind regards,The only programmers that are better C# programmers, are those who look like this -> :bob:
:java: Programm3r My Blog: ^_^
-
Hi..You have to post this question in Linq Forum.. Anyway checkout this link : http://blog.benhall.me.uk/2007/08/linq-to-sql-difference-between-concat.html[^]
Ravi Mori wrote:
You have to post this question in Linq Forum..
Your right ... sorry about that :sigh:
The only programmers that are better C# programmers, are those who look like this -> :bob:
:java: Programm3r My Blog: ^_^