My second question is disposing of processes it does use the IDisposable interface so I figured I'd use using( in front of it? IS this a good or bad idea or does it matter with processes and does the process need to be closed first .Close() or does it still dispose? Thanks guys. The code I have is below
using (var ffmpegproc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "ffmpeg.exe",
Arguments = this.TxtBxFFMPEGCmd.Text,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true
}
})
{
using (StreamReader sr = ffmpegproc.StandardError)
{
ffmpegproc.Start();
string output = sr.ReadToEnd();
this.TxtBxOutPutFFMPEG.Text = output;
ffmpegproc.WaitForExit();
ffmpegproc.Close();
}
}

New Topic/Question
Reply


MultiQuote






|