ConnectionStringSettingsCollection::Clear Method ()

 

Removes all the ConnectionStringSettings objects from the collection.

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

public:
void Clear()

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: