private void button2_Click(object sender, EventArgs e)
{
//弄存檔檔名
saveFileDialog1.ShowDialog();
string save_path = saveFileDialog1.FileName + ".CSV";
int aa = listBox2.Items.Count;
//Save
System.IO.StreamWriter fn = new System.IO.StreamWriter(save_path);
for (int i = 0; i < aa; i++)
{
fn.WriteLine(listBox2.Items[i].ToString());
}
fn.Flush();
fn.Close();
MessageBox.Show("存檔成功 ^^=");
}
沒有留言:
張貼留言