共用方式為


InstanceName 屬性

Gets the name of the instance of SQL Server.

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

語法

'宣告
<DisplayDescriptionKeyAttribute("Server_InstanceNameDesc")> _
<DisplayNameKeyAttribute("Server_InstanceNameName")> _
ReadOnly Property InstanceName As String
    Get
'用途
Dim instance As IServerSetupFacet
Dim value As String

value = instance.InstanceName
[DisplayDescriptionKeyAttribute("Server_InstanceNameDesc")]
[DisplayNameKeyAttribute("Server_InstanceNameName")]
string InstanceName { get; }
[DisplayDescriptionKeyAttribute(L"Server_InstanceNameDesc")]
[DisplayNameKeyAttribute(L"Server_InstanceNameName")]
property String^ InstanceName {
    String^ get ();
}
[<DisplayDescriptionKeyAttribute("Server_InstanceNameDesc")>]
[<DisplayNameKeyAttribute("Server_InstanceNameName")>]
abstract InstanceName : string
function get InstanceName () : String

屬性值

型別:System. . :: . .String
A String value that specifies the name of the instance of SQL Server.

範例

設定屬性