Desi Bravo

Desi Bravo

  • NA
  • 25
  • 0

C# Winforms Addressbook with arrray

Nov 15 2009 12:08 AM
Hi everyone. Write a Windows Application that maintains an address book. This address book should hold up to 20 entries. You must store your data with arrays. Each address entry will have the following: Last Name, First Name Street Address City State Zip Code Your program must have the following functionality: Display the address book (names only in alphabetical order by last name) Display all information about an individual entry (allow the user to select this) Add address entry Delete address entry Can anyone please help me. [code] private void btnAdd_Click(object sender, EventArgs e) { string[] ArrayString = new string [20]{txtFirstName.Text, txtLastName.Text, txtAddress.Text, txtCity.Text, txtState.Text, txtZipCode.Text}; for (int myString = 0; myString < 20; myString++) { arrayNameListBox.Items.Add(ArrayString); } foreach (string myString in ArrayString) { arrayNameListBox.Items.Add(ArrayString); } arrayNameListBox.Items.Add(txtFirstName.Text + " " + txtLastName.Text); arrayNameListBox.Items.Add(txtAddress.Text); arrayNameListBox.Items.Add(txtCity.Text + " " + txtState.Text + " " + txtZipCode.Text); } [/code]

Answers (5)