ExtensionElementCollection.BaseAdd Method (ConfigurationElement)


Adds a configuration element to the ExtensionElementCollection.

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

protected override void BaseAdd(
	ConfigurationElement element

Exception Condition

An extension with the same name or type as element already exists in the collection.

When adding, an element is considered a duplicate only if the keys are identical but the values are different. Elements with identical keys and values are accepted silently because the elements do not compete. However, an element with an identical key but a different value cannot be added because there is no logic to determine which of the competing values should be honored.

.NET Framework
Available since 3.0
Return to top