I am can't figure out how to put the index [i] in the context when I try to write in to the listbox1. The code I got so far is:
private void button1_Click(object sender, EventArgs e)
{
StreamWriter Info = File.AppendText("Contacts.txt");
for (int i = 0; i < listBox1.Items.Count; i++);
Info.WriteLine(listBox1.Items[i]);
Info.Close();
}
I am trying to make a Windows Form application that accepts names and email addresses and places them in a list box. Can anyone help me out on what I am missing here?