共用方式為


UserProfile 屬性

Gets the user profile associated with the referenced connection.

命名空間:  Microsoft.SqlServer.Management.Common
組件:  Microsoft.SqlServer.ConnectionInfo (在 Microsoft.SqlServer.ConnectionInfo.dll 中)

語法

'宣告
Public ReadOnly Property UserProfile As ServerUserProfiles
    Get
'用途
Dim instance As ServerConnection
Dim value As ServerUserProfiles

value = instance.UserProfile
public ServerUserProfiles UserProfile { get; }
public:
property ServerUserProfiles UserProfile {
    ServerUserProfiles get ();
}
member UserProfile : ServerUserProfiles
function get UserProfile () : ServerUserProfiles

屬性值

型別:Microsoft.SqlServer.Management.Common. . :: . .ServerUserProfiles
A ServerUserProfiles object value that specifies the user profile associated with the referenced connection.

範例

C#

ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.UserProfile.ToString());

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.UserProfile