title: How to pass multiple strings to command line argument in another application in c#?
body: <p>I have to trigger another application after user done with my GUI. In order to trigger another application, i have to pass some command line argument to start that application. Let's say I have to pass below arguments:</p>
  
  <p><em>c:\Program File\application.exe
  -name text
  -cmdfile c:\text\open.txt</em></p>
  
  <p>The application.exe is a parameter that i want to pass to another applcation.</p>
  
  <p>Before, that application set those argument in <strong>Visual Studio</strong> -> <strong>Properties</strong> -> <strong>Debug</strong> as "<em>c:\Program File\application.exe" -name text -cmdfile c:\text\open.txt</em></p>
  
  <p>As i understand, every space in above string consider as an argument except the one inside double quotes, so <em>"c:\Program File\application.exe"</em> is the first argument, <em>-name</em> is the second and <em>text</em> is the third. However, if i am using <strong>ProcessStartInfo.Argument</strong> property, if I set <em>"c:\Program File\application.exe" -name text -cmdfile c:\text\open.txt</em>, it first of all give an error, and than I add double quotes at the end of string, another application consider <em>c:\Program</em> as first argument and <em>File\application.exe</em> as second argument. </p>
  
  <p>How can I avoid space as the separator for arguments? How can I pass the whole string as the same format setup in Visual <strong>Studio</strong> -> <strong>Properties</strong> -> <strong>Debug</strong> as "<em>c:\Program File\application.exe" -name text -cmdfile c:\text\open.txt</em> using <strong>ProcessStartInfo.Argument</strong> property?</p>
  
  <blockquote>
    <p>ProcessStartInfo startInfo = new ProcessStartInfo();
    startInfo.Arguments = "c:\Program File\application.exe" -name text
    -cmdfile c:\text\open.txt</p>
  </blockquote>
  
  <p>(error)</p>
  
  <p>if</p>
  
  <blockquote>
    <p>startInfo.Arguments = "c:\Program File\application.exe -name text
    -cmdfile c:\text\open.txt"</p>
  </blockquote>
  
  <p>it takes <em>c:\Program</em> as first argument and <em>File\application.exe</em> as second argument.</p>
  
  <p>How can I figure this out? Any experience on that? Thank you in advance.</p>