1
I’m writing a C# application that needs to receive more than 1 text file and display the Filename
of them in a MessageBox
individual for each.
My question is in this import of the files, I was using OpenFileDialog
to select the file, but it does not work if I select more than 1 text file, below the code used:
private void btnSelecionarArquivos_Click(object sender, EventArgs e)
{
OpenFileDialog fDialog = new OpenFileDialog();
fDialog.Filter = "Arquivos Texto|*.txt";
fDialog.Title = "Selecione os Arquivos";
if(fDialog.ShowDialog() == DialogResult.OK)
{
MessageBox.Show(fDialog.FileName.ToString());
}
}
Show buddy, it worked, thanks!!!
– Guilherme Golfetto