public static void Main()
Customer[] custArray = new Customer[3];
custArray[0] = new Customer() {FirstName = "Joe", LastName = "Smith", Orders = new Order[2]};
custArray[0].Orders[0] = new Order() {Description = "Shoes", Price = 19.99M, Quantity = 1};
custArray[0].Orders[1] = new Order() {Description = "Pants", Price = 29.99M, Quantity = 2};
custArray[1] = new Customer() { FirstName = "Sally", LastName = "Jones", Orders = new Order[2] };
custArray[1].Orders[0] = new Order() { Description = "Shoes", Price = 39.99M, Quantity = 1 };
custArray[1].Orders[1] = new Order() { Description = "Pants", Price = 49.99M, Quantity = 1 };
foreach (var customer in custArray)
if (customer == null) continue;
Console.WriteLine("Customer:\n");
Console.WriteLine("{0, 15} {1, 17}", "First Name", "Last Name");
Console.WriteLine("{0, 10} {1, 20}", customer.FirstName, customer.LastName);
Console.WriteLine("========================================");
Console.WriteLine("Orders:\n");
foreach (var order in customer.Orders)
if (order == null) continue;
Console.WriteLine("{0, 10} {1, 10} {2, 10}", order.Description, order.Price, order.Quantity);
Console.WriteLine("\n\n");
public string Description;