Process クラス

Process クラス (System.Diagnostics 名前空間)

[APIドキュメント]

public class Process : Component, IDisposable

継承:ObjectMarshalByRefObjectComponent → Process

プロパティ

ExitCode

@ [APIドキュメント]

public int ExitCode { get; }

  • 関連付けられたプロセスが終了したときにプロセスによって指定された値(終了コード)を取得します。
  • 終了コードは通常は0で正常終了を表し、それ以外の時はエラーで終了したことを表します。

ExitTime

@ [APIドキュメント]

public DateTime ExitTime { get; }

  • 関連付けられたプロセスが終了した時刻を取得します。

StandardInput

@ [APIドキュメント]

public StreamWriter StandardInput { get; }

  • アプリケーションの入力の書き込みに使用されるストリームを取得します。

StandardOutput

@ [APIドキュメント]

public StreamReader StandardOutput { get; }

  • アプリケーションのテキスト出力の読み取りに使用されるストリームを取得します。

StartInfo

@ [APIドキュメント]

public ProcessStartInfo StartInfo { get; set; }

  • Process の Start メソッドに渡すプロパティを取得または設定します。

StartTime

@ [APIドキュメント]

public DateTime StartTime { get; }

  • 関連付けられたプロセスが起動された時刻を取得します。

メソッド

Start

@ [APIドキュメント]

public static Process? Start (string fileName, string arguments, string userName, SecureString password, string domain);
public static Process? Start (string fileName, string userName, SecureString password, string domain);
public static Process Start (string fileName, string arguments);
public bool Start ();
public static Process Start (string fileName);
public static Process? Start (ProcessStartInfo startInfo);
public static Process Start (string fileName, IEnumerable<string> arguments);

  • プロセス リソースを起動し、Process コンポーネントに関連付けます。

WaitForExit

@ [APIドキュメント]

public void WaitForExit ();
public bool WaitForExit (int milliseconds);

  • 関連付けられたプロセスが終了するまで待機する時間を設定し、指定した時間が経過するかプロセスが終了するまで現在のスレッドの実行をブロックします。

イベント