I'm building a winforms program which parses certain xml files. Now I want that when one of those xml files is double clicked (opened), my program gets called and receives the file path in its main method. I managed to associate xml files to my program, so it opens. But what do I have to do that the file path can be read in my main method? The way I have it below doesn't work. The string array is always empty.
Thanks for your help
static class Program
/// The main entry point for the application.
static void Main(string args)
if (args.Length > 0)
SelectedFile = Convert.ToString(args);
MessageBox.Show(SelectedFile); // Just to confirm it.