Udostępnij przez


Właściwość Computer.ID

Pobiera wartość Identyfikatora, który unikatowo identyfikuje komputer.

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

Składnia

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

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

Wartość właściwości

Typ: System.Int32
A Int32 wartość, która określa wartość Identyfikatora, który unikatowo identyfikuje komputer.

Przykłady

VC #

System.Console.WriteLine(computer.ID);

VB

System.Console.WriteLine(computer.ID)

PowerShell

Write-Host $computer.ID