int totalBytes = 0; int count; char[] buffer = new char[4096]; while ( (count = process.StandardOutput.ReadBlock(buffer, 0, buffer.Length)) > 0 ) { totalBytes += count; }