ConnectionStringSettings.ConnectionString Property

 

Gets or sets the connection string.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

[ConfigurationPropertyAttribute("connectionString", Options = ConfigurationPropertyOptions.IsRequired, 
	DefaultValue = "")]
public string ConnectionString { get; set; }

Property Value

Type: System.String

The string value assigned to the ConnectionString property.

The following example shows how to use the ConnectionString property.

Console.WriteLine("  Connection String: \"{0}\"",
    cs.ConnectionString);

.NET Framework
Available since 2.0
Return to top
Show: