Connection.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 the Windows domain or local account name for the user.
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 Windows domain or local account name of the user whose credentials are being used in this connection.
Examples
public string UserName(IServiceProvider sp) {
Connection con = (Connection)sp.GetService(typeof(Connection));
return con.UserName;
}