Skip to content

Instantly share code, notes, and snippets.

@bradmartin333
Created August 16, 2021 16:40
Show Gist options
  • Save bradmartin333/a59e027740cbd89b2d0cc9d458844e9b to your computer and use it in GitHub Desktop.
Save bradmartin333/a59e027740cbd89b2d0cc9d458844e9b to your computer and use it in GitHub Desktop.
public static void OpenWithDefaultProgram(string path)
{
using (Process fileopener = new Process())
{
fileopener.StartInfo.FileName = "explorer";
fileopener.StartInfo.Arguments = "\"" + path + "\"";
fileopener.Start();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment