次の方法で共有


Name プロパティ

コンピューターの名前を取得します。

名前空間:  Microsoft.SqlServer.Management.Utility
アセンブリ:  Microsoft.SqlServer.Management.Utility (Microsoft.SqlServer.Management.Utility.dll)

構文

'宣言
<SfcPropertyAttribute> _
<SfcKeyAttribute()> _
Public ReadOnly Property Name As String
    Get
'使用
Dim instance As Computer
Dim value As String

value = instance.Name
[SfcPropertyAttribute]
[SfcKeyAttribute()]
public string Name { get; }
[SfcPropertyAttribute]
[SfcKeyAttribute()]
public:
property String^ Name {
    String^ get ();
}
[<SfcPropertyAttribute>]
[<SfcKeyAttribute()>]
member Name : string
function get Name () : String

プロパティ値

型: System. . :: . .String
コンピューターの名前を示す String 値です。

使用例

VC#

System.Console.WriteLine(computer.Name);

VB

System.Console.WriteLine(computer.Name)

PowerShell

Write-Host $computer.Name