title: How do I create a C# program with arguments that you can right click a file and open with that C# program?
body: <p>How do I create a C# program with arguments that you can right click a file and open with that C# program? </p>
  
  <pre><code>namespace JV_Media_Player
  {
      class Program
      {
          static void Main(string[] args)
          {
              if (args == null)
                  return;
  
              WMPLib.WindowsMediaPlayer windowsMediaPlayer = new WMPLib.WindowsMediaPlayer();
  
              windowsMediaPlayer.URL = args[0];
              windowsMediaPlayer.controls.play();
          }
      }
  }
  </code></pre>