GenericIdentity コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > GenericIdentity コンストラクタの意味・解説 

GenericIdentity コンストラクタ (String, String)

名前および認証種類指定してユーザーを表す GenericIdentity クラス新しインスタンス初期化します。

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

例外例外
例外種類条件

ArgumentNullException

name パラメータnull 参照 (Visual Basic では Nothing) です。

または

type パラメータnull 参照 (Visual Basic では Nothing) です。

使用例使用例

GenericIdentity コンストラクタ使用する方法次のコード示します。このコード例は、GenericIdentity クラストピック取り上げているコード例一部分です。

Dim windowsIdentity As WindowsIdentity = windowsIdentity.GetCurrent()

' Construct a GenericIdentity object based on the current Windows
' identity name and authentication type.
Dim authenticationType As String
 = windowsIdentity.AuthenticationType
Dim userName As String =
 windowsIdentity.Name
Dim authenticatedGenericIdentity As _
    New GenericIdentity(userName, authenticationType)
WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent();

// Construct a GenericIdentity object based on the current Windows
// identity name and authentication type.
string authenticationType = windowsIdentity.AuthenticationType;
string userName = windowsIdentity.Name;
GenericIdentity authenticatedGenericIdentity =
    new GenericIdentity(userName, authenticationType);
WindowsIdentity^ windowsIdentity = WindowsIdentity::GetCurrent();

// Construct a GenericIdentity object based on the current Windows
// identity name and authentication type.
String^ authenticationType = windowsIdentity->AuthenticationType;
String^ userName = windowsIdentity->Name;
GenericIdentity^ authenticatedGenericIdentity = gcnew GenericIdentity( userName,authenticationType
 );
WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent();
// Construct a GenericIdentity object based on the current Windows
// identity name and authentication type.
String authenticationType = windowsIdentity.get_AuthenticationType();
String userName = windowsIdentity.get_Name();
GenericIdentity authenticatedGenericIdentity 
    = new GenericIdentity(userName, authenticationType);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GenericIdentity クラス
GenericIdentity メンバ
System.Security.Principal 名前空間

GenericIdentity コンストラクタ (String)

指定した名前のユーザーを表す GenericIdentity クラス新しインスタンス初期化します。

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

public GenericIdentity (
    string name
)
public:
GenericIdentity (
    String^ name
)
public GenericIdentity (
    String name
)
public function GenericIdentity (
    name : String
)

パラメータ

name

コード実行されている対象ユーザーの名前。

例外例外
例外種類条件

ArgumentNullException

name パラメータnull 参照 (Visual Basic では Nothing) です。

使用例使用例

GenericIdentity コンストラクタ使用する方法次のコード示します。このコード例は、GenericIdentity クラストピック取り上げているコード例一部分です。

Dim defaultIdentity As New
 GenericIdentity("DefaultUser")
GenericIdentity defaultIdentity = new GenericIdentity("DefaultUser");
GenericIdentity^ defaultIdentity = gcnew GenericIdentity( "DefaultUser"
 );
GenericIdentity defaultIdentity = new GenericIdentity("DefaultUser");
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GenericIdentity クラス
GenericIdentity メンバ
System.Security.Principal 名前空間

GenericIdentity コンストラクタ

GenericIdentity クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
GenericIdentity (String) 指定した名前のユーザーを表す GenericIdentity クラス新しインスタンス初期化します。
GenericIdentity (String, String) 名前および認証種類指定してユーザーを表す GenericIdentity クラス新しインスタンス初期化します。
参照参照

関連項目

GenericIdentity クラス
GenericIdentity メンバ
System.Security.Principal 名前空間



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

辞書ショートカット

すべての辞書の索引

「GenericIdentity コンストラクタ」の関連用語

GenericIdentity コンストラクタのお隣キーワード
検索ランキング

   

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



GenericIdentity コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS