ConnectionStringsSection
Provides programmatic access to the connection strings configuration-file section.
namespace System.Configuration
{
public sealed class ConnectionStringsSection : ConfigurationSection
{
private static readonly ConfigurationPropertyCollection s_properties;
private static readonly ConfigurationProperty s_propConnectionStrings;
protected internal override ConfigurationPropertyCollection Properties => s_properties;
[ConfigurationProperty("", Options = ConfigurationPropertyOptions.IsDefaultCollection)]
public ConnectionStringSettingsCollection ConnectionStrings {
get {
return (ConnectionStringSettingsCollection)base[s_propConnectionStrings];
}
}
static ConnectionStringsSection()
{
s_propConnectionStrings = new ConfigurationProperty(null, typeof(ConnectionStringSettingsCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
s_properties = new ConfigurationPropertyCollection {
s_propConnectionStrings
};
}
protected internal override object GetRuntimeObject()
{
SetReadOnly();
return this;
}
}
}