title: c# how pass parameters to process OutputHandler?
body: <p>I am open some <code>process</code> and read its output and I want to pass this function another param:</p>
  <pre><code>    public void Start(string fileName, string arguments)
      {
          Process process = new Process();
          process.StartInfo.FileName = fileName;
          process.StartInfo.Arguments = arguments;
          process.StartInfo.UseShellExecute = false;
          process.StartInfo.RedirectStandardOutput = true;
          process.StartInfo.RedirectStandardError = true;
          process.StartInfo.CreateNoWindow = true;
          process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
          process.OutputDataReceived += new DataReceivedEventHandler(OutputHandler);
          process.ErrorDataReceived += new DataReceivedEventHandler(OutputHandler);
          process.Start();
          process.BeginOutputReadLine();
          process.BeginErrorReadLine();
      }
  
      private void OutputHandler(object sender, DataReceivedEventArgs e)
      {
          App.Current.Dispatcher.Invoke((Action)delegate
          {
              string line = e.Data;
              if (line != null)
                  {
  
                  }
          });
      }
  </code></pre>