Dil

Process.TryGetProcessById(Int32, Process) Yöntem

Tanım

Belirtilen işlem kimliğine sahip mevcut bir işlemin örneğini almaya Process çalışır.

public:
 static bool TryGetProcessById(int processId, [Runtime::InteropServices::Out] System::Diagnostics::Process ^ % process);
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static bool TryGetProcessById(int processId, out System.Diagnostics.Process? process);
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member TryGetProcessById : int * Process -> bool
Public Shared Function TryGetProcessById (processId As Integer, ByRef process As Process) As Boolean

Parametreler

processId
Int32

Bulunacak işlemin işlem kimliği.

process
Process

Bu yöntem döndürdüğünde true, mevcut işlemi temsil eden bir Process içerir; aksi takdirde , null.

Döndürülenler

true işlem bulunduysa; aksi takdirde , false.

Öznitelikler

Özel durumlar

processId sıfırdan küçük veya sıfıra eşit.

Şunlara uygulanır