GenericIdentity コンストラクタ (String, String)
アセンブリ: mscorlib (mscorlib.dll 内)
構文
例外
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);
Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
GenericIdentity コンストラクタ (String)
アセンブリ: mscorlib (mscorlib.dll 内)
構文
例外
使用例
GenericIdentity コンストラクタを使用する方法を次のコードに示します。このコード例は、GenericIdentity クラスのトピックで取り上げているコード例の一部分です。
GenericIdentity^ defaultIdentity = gcnew GenericIdentity( "DefaultUser" );
Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
GenericIdentity コンストラクタ
- GenericIdentity コンストラクタのページへのリンク