共用方式為


FixedServerRoles 屬性

Gets the fixed server role associated with the referenced connection.

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

語法

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

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

屬性值

型別:Microsoft.SqlServer.Management.Common. . :: . .FixedServerRoles
A FixedServerRoles object value that specifies the fixed server role associated with the referenced connection.

範例

C#

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

PowerShell

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