title: Split (NOT PARSE) a string into command line args C#
body: <p>Salutations,</p>
  
  <p>I have what seems to be a simple problem but is very much not. I want to take a string and split it into command line arguments. I have been Googling this question for weeks and can't find anything that suits my needs. </p>
  
  <p>For example, the line:
  <code>--foo=bar -foo="bar test" --foo "bar \"test\"" --foo bar</code></p>
  
  <p>Would split into: <strong>(in this order)</strong></p>
  
  <ul>
  <li><code>--foo=bar</code></li>
  <li><code>-foo=bar test</code></li>
  <li><code>--foo</code></li>
  <li><code>bar "test"</code></li>
  <li><code>--foo</code></li>
  <li><code>bar</code></li>
  </ul>
  
  <p><strong>EDIT</strong></p>
  
  <p>Yes I realize --foo is use more that once. This is splitting/tokenizing. Not parsing, that's the next step. I don't care if that would error when i go to parse. What i want to do RIGHT NOW is get the string into an array state that i can then feed into Mono.Options</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Read the example. That is what I am trying to accomplish. <strong>JUST</strong> that. </p>