WindowsPrincipal.Identity プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WindowsPrincipal.Identity プロパティの意味・解説 

WindowsPrincipal.Identity プロパティ

現在のプリンシパルID取得します

名前空間: System.Security.Principal
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Overridable ReadOnly
 Property Identity As IIdentity
Dim instance As WindowsPrincipal
Dim value As IIdentity

value = instance.Identity
public virtual IIdentity Identity { get; }
public:
virtual property IIdentity^ Identity {
    IIdentity^ get ();
}
/** @property */
public IIdentity get_Identity ()

プロパティ
現在のプリンシパルの WindowsIdentity オブジェクト

使用例使用例

WindowsPrincipal オブジェクトIdentity プロパティ使用してユーザーの名前を取得する例を次に示します

Dim wp As New WindowsPrincipal(WindowsIdentity.GetCurrent())
Dim username As String =
 wp.Identity.Name

WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
String username = wp.Identity.Name;

WindowsPrincipal^ wp = gcnew WindowsPrincipal( WindowsIdentity::GetCurrent() );
String^ username = wp->Identity->Name;
WindowsPrincipal wp = 
    new WindowsPrincipal(WindowsIdentity.GetCurrent());
String userName = wp.get_Identity().get_Name();
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WindowsPrincipal クラス
WindowsPrincipal メンバ
System.Security.Principal 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

WindowsPrincipal.Identity プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WindowsPrincipal.Identity プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS