ExtensionElementCollection.BaseAdd Method

Definition

Adds a configuration element to the ExtensionElementCollection.

Overloads

BaseAdd(ConfigurationElement)

Adds a configuration element to the ExtensionElementCollection.

BaseAdd(Int32, ConfigurationElement)

Adds a configuration element to the ExtensionElementCollection, at the specified location.

Remarks

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.

BaseAdd(ConfigurationElement)

Adds a configuration element to the ExtensionElementCollection.

protected:
 override void BaseAdd(System::Configuration::ConfigurationElement ^ element);
protected override void BaseAdd (System.Configuration.ConfigurationElement element);
override this.BaseAdd : System.Configuration.ConfigurationElement -> unit
Protected Overrides Sub BaseAdd (element As ConfigurationElement)

Parameters

Exceptions

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

Remarks

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.

Applies to

BaseAdd(Int32, ConfigurationElement)

Adds a configuration element to the ExtensionElementCollection, at the specified location.

protected:
 override void BaseAdd(int index, System::Configuration::ConfigurationElement ^ element);
protected override void BaseAdd (int index, System.Configuration.ConfigurationElement element);
override this.BaseAdd : int * System.Configuration.ConfigurationElement -> unit
Protected Overrides Sub BaseAdd (index As Integer, element As ConfigurationElement)

Parameters

index
Int32

The index location at which to add element.

Exceptions

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

Remarks

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.

Applies to