Skip to content

Instantly share code, notes, and snippets.

@Fresh-Dev
Created February 10, 2016 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fresh-Dev/eec4e7c4ee3ac8bdcef4 to your computer and use it in GitHub Desktop.
Save Fresh-Dev/eec4e7c4ee3ac8bdcef4 to your computer and use it in GitHub Desktop.
Open File Dialog Simple Example
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{ return (openFileDialog1.FileName.ToString()); }
else { return "Ungültiger Dateipfad !"; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment