Share via


DataSourceElementCollection.BaseAdd Method

Include Protected Members
Include Inherited Members

Adds a ConfigurationElement to an ConfigurationElementCollection instance when overridden in a derived class.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

 

Name

Description

Protected method

BaseAdd(ConfigurationElement)

Adds a configuration element to the ConfigurationElementCollection. (Inherited from ConfigurationElementCollection.)

Protected method

BaseAdd(ConfigurationElement, Boolean)

Adds a configuration element to the configuration element collection. (Inherited from ConfigurationElementCollection.)

Protected method

BaseAdd(Int32, ConfigurationElement)

Adds a configuration element to the configuration element collection. (Inherited from ConfigurationElementCollection.)

Top

Remarks

Use the BaseAdd method to add a new ConfigurationElement to the collection. Override in a derived class if custom behavior is required when the element is added.

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.

See Also

Reference

DataSourceElementCollection Class

DataSourceElementCollection Members

Microsoft.VisualStudio.TestTools.UnitTesting Namespace