ManagedInstance.Name 属性

定义

获取或设置托管实例的名称。

public:  property System::String ^ Name {  public:
System::String ^ get(); protected:
 void set(System::String ^ value); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcKey(0)]
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.ReadOnlyAfterCreation | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)]
public string Name { get; protected set; }
[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcKey(0)>]
[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.ReadOnlyAfterCreation | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)>]
member this.Name : string with get, set
Public Property Name As String

属性值

一个 String 值,该值指定托管实例的名称。

属性

示例

Vc#

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

VB

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

PowerShell

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

Write-Host $managedInstance.Name

适用于