title: Best way to handle command line options in C#
body: <p>I'm quite familiar with command-line arguments and how to use them, but I have never dealt with options (or flags) before. I refer to something like the following:</p>
  
  <pre><code>$ sort -f -s -u letters.txt
  </code></pre>
  
  <p>In the bash script example above, we have 3 options or flags, followed by regular arguments. I want to do something similar in a C# application. What is the best way to handle command-line options where the arguments could be given in the following form?</p>
  
  <pre><code>$ prog [-options] [args...]
  </code></pre>