WindowsIdentity.ImpersonationLevel プロパティ

定義

ユーザーの偽装レベルを取得します。

public:
 property System::Security::Principal::TokenImpersonationLevel ImpersonationLevel { System::Security::Principal::TokenImpersonationLevel get(); };
public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get; }
member this.ImpersonationLevel : System.Security.Principal.TokenImpersonationLevel
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.ImpersonationLevel : System.Security.Principal.TokenImpersonationLevel
Public ReadOnly Property ImpersonationLevel As TokenImpersonationLevel

プロパティ値

TokenImpersonationLevel

偽装レベルを指定する列挙値の 1 つ。

属性

次のコード例は、 プロパティを使用して、現在のユーザーの ImpersonationLevel 偽装レベルを表示する方法を示しています。 このコード例は、WindowsIdentity クラスのために提供されている大規模な例の一部です。

TokenImpersonationLevel token = windowsIdentity.ImpersonationLevel;
Console.WriteLine("The impersonation level for the current user is : " + token.ToString());
Dim token As TokenImpersonationLevel
token = windowsIdentity.ImpersonationLevel
Console.WriteLine("The impersonation level for the current user is : " + token.ToString())

注釈

WMI (Windows Management Instrumentation) に接続するために使用する偽装レベルを記述します。

適用対象