語言

WebThreadInformation.IsImpersonating 屬性

定義

會得到目前的線程模擬模式。

public:
 property bool IsImpersonating { bool get(); };
public bool IsImpersonating { get; }
member this.IsImpersonating : bool
Public ReadOnly Property IsImpersonating As Boolean

屬性值

true若執行緒以模擬模式執行;否則,。 false

範例

以下程式碼範例說明如何取得執行緒模擬模式。

// Get the impersonation mode.
public string GetThreadImpersonation()
{
    return (string.Format(
        "Is impersonating: {0}",
        ThreadInformation.IsImpersonating.ToString()));
}
' Get the impersonation mode.
Public Function GetThreadImpersonation() As String
     Return String.Format( _
     "Is impersonating: {0}", _
     ThreadInformation.IsImpersonating.ToString())
End Function 'GetThreadImpersonation

適用於