User2.LoginName プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ユーザーの完全な資格情報を取得します。
public:
property System::String ^ LoginName { System::String ^ get(); };
public string LoginName { get; }
member this.LoginName : string
Public ReadOnly Property LoginName As String
プロパティ値
domain\username という形式のユーザーの資格情報。
例
次の例では、LoginName プロパティを使用して、現在のユーザーのログイン資格情報を表示しています。
User2 thisUser = thisApplication.User;
thisXDocument.UI.Alert(thisUser.LoginName);
Dim thisUser As User2 = thisApplication.User
thisXDocument.UI.Alert(thisUser.LoginName)
注釈
LoginName プロパティは、ユーザーの資格情報を domain\username として返します。 ユーザーのアカウントがドメインに属していない場合は、username のみを返します。
これは、System.Environment.UserDomainName+"\\"+System.Environment.UserName を呼び出すのと同等です。