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)

适用于

另请参阅