Udostępnij przez


Właściwość ManagedInstance.ID

Pobiera wartość Identyfikatora, który jednoznacznie identyfikuje wystąpienie zarządzane SQL Server.

Przestrzeń nazw:  Microsoft.SqlServer.Management.Utility
Zestaw:  Microsoft.SqlServer.Management.Utility (w Microsoft.SqlServer.Management.Utility.dll)

Składnia

'Deklaracja
<SfcPropertyAttribute(SfcPropertyFlags.Data)> _
Public ReadOnly Property ID As Integer
    Get
'Użycie
Dim instance As ManagedInstance
Dim value As Integer

value = instance.ID
[SfcPropertyAttribute(SfcPropertyFlags.Data)]
public int ID { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Data)]
public:
property int ID {
    int get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Data)>]
member ID : int
function get ID () : int

Wartość właściwości

Typ: System.Int32
A Int32 wartość, która określa wartość Identyfikatora, który unikatowo identyfikuje wystąpienie zarządzane.

Przykłady

VC #

ManagedInstance managedInstance;
managedInstance = new ManagedInstance ();
System.Console.WriteLine(managedInstance.ID);

VB

Dim managedInstance As ManagedInstance
managedInstance = New ManagedInstance() 
System.Console.WriteLine(managedInstance.ID)

PowerShell

$managedInstance = New-Object Microsoft.SqlServer.Management.Utility.ManagedInstance
Write-Host $managedInstance.ID