title: do the same command for each line C#
body: <p>I want to do the same code for multiple lines so I created a text file in resources and that's my code</p>
  <pre><code>string[] commands = File.ReadAllLines(SodaScript.Properties.Resources.ServicesToDisable);
              foreach (string command in commands)
              {
                  Process process = new Process();
                  ProcessStartInfo startInfo = new ProcessStartInfo();
                  startInfo.WindowStyle = ProcessWindowStyle.Hidden;
                  startInfo.FileName = &quot;sc.exe&quot;;
                  startInfo.Arguments = &quot;config &quot; + command + &quot; start= disabled&quot;;
                  startInfo.Verb = &quot;runas&quot;;
                  process.StartInfo = startInfo;
                  process.Start();
              }
  </code></pre>
  <p>and this is the txt file</p>
  <p><a href="https://i.stack.imgur.com/RCB83.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RCB83.png" alt="the txt file" /></a></p>
  <p>but it gives this error</p>
  <p><a href="https://i.stack.imgur.com/T7uk2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T7uk2.png" alt="the error" /></a></p>