Open File With Associated Application [C#]

This example demonstrates how to open file with an associated program. It shows, how to open text document in notepad, how to open image in a default viewer or how to open url address in a default web browser.

Applications are launched using Process.Start method. The file path or url is passed as a parameter.

// open text file in notepad (or another default text editor)

// open image in default viewer

// open url in default web browser

// open PDF file

Similarly you can open Word document or any other file from your .NET application.

Files and Folders Examples

See also