共用方式為


ConnectionStringSettings.Name 屬性

定義

取得或設定 ConnectionStringSettings 名稱。

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("name", DefaultValue="", Options=System.Configuration.ConfigurationPropertyOptions.IsKey | System.Configuration.ConfigurationPropertyOptions.IsRequired)]
public string Name { get; set; }
public string Name { get; set; }
[<System.Configuration.ConfigurationProperty("name", DefaultValue="", Options=System.Configuration.ConfigurationPropertyOptions.IsKey | System.Configuration.ConfigurationPropertyOptions.IsRequired)>]
member this.Name : string with get, set
member this.Name : string with get, set
Public Property Name As String

屬性值

指派給 Name 屬性的字串值。

屬性

範例

下列範例將示範如何使用 Name 屬性。

Console.WriteLine("  Name: {0}", cs.Name);
Console.WriteLine("  Name: {0}", cs.Name)

適用於

另請參閱