User2.UserName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets only the user's username.
public:
property System::String ^ UserName { System::String ^ get(); };
public string UserName { get; }
member this.UserName : string
Public ReadOnly Property UserName As String
Property Value
The user's username.
Examples
In the following example, the UserName property is used to display the current user's login credentials.
User2 thisUser = thisApplication.User;
thisXDocument.UI.Alert(thisUser.UserName);
Dim thisUser As User2 = thisApplication.User
thisXDocument.UI.Alert(thisUser.UserName)
Remarks
Calling the UserName property is equivalent to calling System.Environment.UserName.