Como ler linha de saída padrão por linha?

Quero inspecionar a saída padrão linha a linha do processo. depois de ler a segunda linha, myProcess.StandardOutput.EndofStream muda de false para true. Portanto, ele sai do loop while. Talvez eu devesse usar outra coisa?

Process myProcess = new Process();
try
{
    myProcess.StartInfo.UseShellExecute = false;
    myProcess.StartInfo.FileName = my_command;
    myProcess.StartInfo.Arguments = " "+ location;
    myProcess.StartInfo.CreateNoWindow = true;
    myProcess.StartInfo.RedirectStandardOutput = true;
    myProcess.Start();

    while (!myProcess.StandardOutput.EndOfStream)
    {
        string standard_output = myProcess.StandardOutput.ReadLine();
        if (standard_output.Contains("xx"))
        {
           //do something

            break;
        }
    }

    myProcess.WaitForExit();
}

questionAnswers(1)

yourAnswerToTheQuestion