, . , , , . , , ,. . , . , , , ! , , , (TPL), .
#. , , . . C# Process, System. Diagnostics. .
Start (), Process. :
public static Process Start(string _)
_ , .
, Close (), , . Close ().
Public void Close ()
. Windows , CloseMainWindow (), .
Public bool CloseMainWindow()
, . true, , false, . , , , CloseMainWindow () . , .
Kill (), .
Public void Kill()
Kill () , . , , , , .
|
|
, WaitForExit (). .
Public void WaitForExit()
public bool WaitForExit(int )
, , . WaitForExit () true, , false, .
, . Windows: WordPad.exe, WordPad .
// .
Using System;
Using System.Diagnostics;
class StartProcess { static void Main() {
Process newProc =r Process.Start("wordpad.exe");
Console.WriteLine(" .");
NewProc.WaitForExit();
newProc.Close(); // Console.WriteLine(" .");
}
}
WordPad, " . ". WordPad. WordPad " .11.
24 . : TPL
, , 4.0 .NET Framework, (TPL). . -, . -, . , TPL . TPL .
, 4.0 .NET Framework, (PLINQ). PLINQ , , , . , . , PLINQ .
, TPL PLINQ, . .