using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class UsingArrays : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
      Customer[] myCustomers = new Customer[] {
         new Customer("334", "Thomas", "Hobbes", "123-4567"),
         new Customer("123", "Jean-Jacques", "Rosseau","456-1267"),
         new Customer("085", "David", "Hume", "564-7823"),
         new Customer("254", "Martin", "Heidegger", "253-6383")
      };
      Customer c1 = myCustomers[2];
      labMsg.Text = c1.FirstName + "<br/>";

      labMsg.Text += myCustomers.GetUpperBound(0) + "," + myCustomers.Length ;

       labMsg.Text += "<h2>Iteration Output</h2>";
       IEnumerator ie = myCustomers.GetEnumerator();
       while (ie.MoveNext())
       {
          Customer c = (Customer)ie.Current;
          labMsg.Text += c.FirstName + "<br/>";
       }
    }
}
