title: c# split string with " exception
body: <p>I want to split a string into parts, to retrieve arguments.</p>
  
  <p>I already made that function:</p>
  
  <pre><code>static private string getparam(string input, int index)
      {
          string[] arrparams = input.Split(' ');
  
          if (arrparams.Length &lt;= index) return "";
  
          return arrparams[index];
      }
  </code></pre>
  
  <p>But when i pass an argument like:</p>
  
  <p>upload C:\Visual Studio</p>
  
  <p>it will see "C:\Visual" as the first argument and "Studio" as the second and split em.</p>
  
  <p>Now i thought about making something like an exception in the Split-Function:
  When the argument is given between quotes, it should ignore the spaces in it.</p>
  
  <p>Then, when i pass the arg like this:
  upload "C:\Visual Studio", the first argument should be C:\Visual Studio</p>
  
  <p>So how could i implement this? </p>
  
  <p>Thank you.</p>