WebProcessStatistics.ThreadCount 属性

定义

获取进程线程的总数。

public:
 property int ThreadCount { int get(); };
public int ThreadCount { get; }
member this.ThreadCount : int
Public ReadOnly Property ThreadCount As Integer

属性值

Int32

进程线程的总数。

示例

下面的代码示例演示如何获取 ThreadCount 值。

public string GetThreadCount()
{
    // Get the thread count.
    return (string.Format(
        "Thread count: {0}",
        processStatistics.ThreadCount.ToString()));
}
Public Function GetThreadCount() As String
    ' Get the thread count.
    Return String.Format( _
    "Thread count: {0}", _
    processStatistics.ThreadCount.ToString())
End Function 'GetThreadCount

注解

计数是指托管和非托管线程。

适用于