How do I launch files in C#

Use:

System.Diagnostics.Process.Start(filePath);

It will use the default program that would be opened as if you just clicked on it. Admittedly it doesn’t let you choose the program that will run… but assuming that you want to mimic the behaviour that would be used if the user were to double-click on the file, this should work just fine.

Leave a Comment