ProcessStartInfo.RedirectStandardOutput プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)

アプリケーション出力を Process.StandardOutput ストリーム書き込むかどうかを示す値を取得または設定します

名前空間: System.Diagnostics
アセンブリ: System (system.dll 内)
構文構文

解説解説

使用例使用例

compiler.StartInfo.FileName = "csc.exe" compiler.StartInfo.Arguments = "/r:System.dll /out:sample.exe stdstr.cs" compiler.StartInfo.UseShellExecute = False compiler.StartInfo.RedirectStandardOutput = True compiler.Start()

Console.WriteLine(compiler.StandardOutput.ReadToEnd())

compiler.WaitForExit()

Process compiler = new Process(); compiler.StartInfo.FileName = "csc.exe"; compiler.StartInfo.Arguments = "/r:System.dll /out:sample.exe stdstr.cs"; compiler.StartInfo.UseShellExecute = false; compiler.StartInfo.RedirectStandardOutput = true; compiler.Start();

Console.WriteLine(compiler.StandardOutput.ReadToEnd());

compiler.WaitForExit();

プラットフォームプラットフォーム

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

開発プラットフォーム中には.NET Framework によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

参照参照