Search code examples
file-association

c# program how to open file with double click


I have a C# program which works with files created by itself. The file can be opened by running the program and then accessing it via the GUI.

How can I open the file without having to run the program explicitly and just by double clicking on the concerned file?


Solution

  • You have to add registry entries in your installer to associate your program's file extension with your application.

    Here is an article in MSDN that will tell you what you need to know about file associations: How File Associations Work