ConnectionStringSettingsCollection::Clear Method ()
.NET Framework (current version)
Removes all the ConnectionStringSettings objects from the collection.
Assembly: System.Configuration (in System.Configuration.dll)
The Clear method removes all the connection strings from the configuration file at the current configuration hierarchy level and writes a <clear> tag in the file. The <clear> tag signifies that all the connection strings defined in the parent configuration files are disregarded by the system.
The following example shows how to remove all the ConnectionStringSettings objects from the ConnectionStringSettingsCollection collection.
.NET Framework
Available since 2.0
Available since 2.0
Show: