Per visualizzare in C# la finestra standard di windows per l'apertura dei file

C#

OpenFileDialog openDialog = new OpenFileDialog();
openDialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
      
if (openDialog.ShowDialog(this) == DialogResult.OK)
{               
	MessageBox.Show(openDialog.FileName); // nome del file selezionato
	//MessageBox.Show(ReadFile(openDialog.FileName));
}
Tags:
C#235 .NET66 Esempi224 Windows73 Windows Form1
Potrebbe interessarti anche: