using System; using System.Data; using System.Configuration; 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; using System.Collections.Generic; /// /// Summary description for Person /// public class Person { private string _firstName; private string _lastName; private string _phoneNumber; private string _postalCode; public string FirstName { get { return _firstName; } set { _firstName = value; } } public string LastName { get { return _lastName; } set { _lastName = value; } } public string PhoneNumber { get { return _phoneNumber; } set { _phoneNumber = value; } } public string PostalCode { get { return _postalCode; } set { _postalCode = value; } } public Person() { } public Person(string firstName, string lastName, string phoneNumber, string postalCode) { this.FirstName = firstName; this.LastName = lastName; this.PhoneNumber = phoneNumber; this.PostalCode = postalCode; } public static List GetPeople() { List people = new List(); Person p1 = new Person("Carl", "Stewart", "705 555-1234", "L3X 9A8"); Person p2 = new Person("Jane", "Doe", "416 555-6452", "N9A 7W2"); Person p3 = new Person("Joe", "Smith", "905 555-2345", "T0X 7A8"); Person p4 = new Person("Jane", "Doe", "705 555-3457", "R9X 7S9"); Person p5 = new Person("Mike", "Jordan", "416 555-2323", "N9Z 7S0"); Person p6 = new Person("Ervin", "Johnson", "435 555-9876", "90210"); Person p7 = new Person("Kent", "Clarke", "756 555-3456", "B9S7B5"); people.Add(p1); people.Add(p2); people.Add(p3); people.Add(p4); people.Add(p5); people.Add(p6); people.Add(p7); return people; } }