Explanation:
I don’t remember about Linux and I don’t know about OS X, but in Windows you can right-click a file and select a program to open it. But how does the OS know exactly how to make the program open it? Does it keep track of the “Open file” dialogs the program has? Does the developer have to specify a special event handler or something for these cases?
Explanation: I don’t remember about Linux and I don’t know about OS X, but
Share
The operating system runs the specified program sending as parameter the path of the file to open.
For example, in C#, if you want to know which file the operating system wants you to open you’ll need to do: