Last active
September 9, 2015 00:21
-
-
Save pparadis/0844f30f5ef39726d7f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var results = users.SelectMany(p => p.Departments, (user, departement) => new Tuple<string, string>(user.Name, departement.Name)); | |
foreach(var userAndDepartment in results) | |
{ | |
Console.WriteLine(string.Format("User: {0} - Department: {1}", userAndDepartment.Item1, userAndDepartment.Item2)); | |
} | |
Console.ReadKey(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment