InstanceName 屬性
Gets the instance name of the instance of SQL Server.
命名空間: Microsoft.SqlServer.Management.Smo
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
<SfcPropertyAttribute> _
Public ReadOnly Property InstanceName As String
Get
'用途
Dim instance As Server
Dim value As String
value = instance.InstanceName
[SfcPropertyAttribute]
public string InstanceName { get; }
[SfcPropertyAttribute]
public:
property String^ InstanceName {
String^ get ();
}
[<SfcPropertyAttribute>]
member InstanceName : string
function get InstanceName () : String
屬性值
型別:System. . :: . .String
A String value that specifies the instance name of the instance of SQL Server.
備註
The InstanceName property specifies the name of the instance of SQL Server. This is usually the computer name but it may be a named instance that was specified during setup.
範例
Console.WriteLine(srv.InstanceName)