using System;
using System.Linq;
public class Program
{
public static void Main()
var customers = new[] {
new Customer {
Invoices = new[] {
new Invoice {Id=1},
new Invoice {Id=2},
}
},
new Invoice {Id=3},
new Invoice {Id=4},
new Invoice {Id=5},
new Invoice {Id=6},
};
var allInvoicesFromAllCustomers = customers.SelectMany(c => c.Invoices);
Console.WriteLine(
string.Join(",", allInvoicesFromAllCustomers.Select(i => i.Id).ToArray()));
class Invoice
public int Id { get; set; }
class Customer
public Invoice[] Invoices {get;set;}