thanks for your help! When creating a txt from a listbox, the txt is being generated with a last empty line here is my code:
private void button1_Click(object sender, EventArgs e)
{
SaveFileDialog lsd = new SaveFileDialog();
if (lsd.ShowDialog() == DialogResult.OK)
{
StreamWriter writer = new StreamWriter(lsd.FileName + ".TXT");
for (int i = 0; i < listBox1.Items.Count; i++)
{
writer.WriteLine(listBox1.Items[i]);
}
writer.Close();
}
lsd.Dispose();
}
Any Idea on how I can avoid generating that last line?
Thanks again for your help!