title: Get File Extension of File Dropped Onto Windows Form
body: <p>How can I capture the file extension of the file dropped onto a windows form?  For example (pseudocode below) </p>
  
  <pre><code>if extension = .xlsx { method1 }
  if extension = .txt { method2 }
  else { MessageBox.Show("Please drag/drop either a .xlsx or a .txt file"); }
  </code></pre>