FileStream file_1 = null;
try
{
file_1 = File.Open(
Application.StartupPath+@"\m_name.txt",FileMode.Create);
}
catch(Exception)
{
MessageBox.Show("保存列表失败");
}
StreamWriter writer = new StreamWriter(file_1);
for(int i=0;i<this.listBox1.Items.Count;i++)
{
writer.WriteLine(this.listBox1.Items[i].ToString());
}
writer.Close();