語言

ExtensionElementCollection.BaseAdd 方法

定義

將群組態專案加入至 ExtensionElementCollection。

多載

名稱 Description
BaseAdd(ConfigurationElement)

將群組態專案加入至 ExtensionElementCollection。

BaseAdd(Int32, ConfigurationElement)

在指定位置為 加入一個配置元素 ExtensionElementCollection。

備註

在加法時,只有當鍵相同但值不同時,元素才被視為重複。 鍵與值相同的元素會被靜默接受,因為元素間不競爭。 然而,若元素鍵相同但值不同,則無法加入,因為沒有邏輯判斷應尊重哪兩個競爭值。

BaseAdd(ConfigurationElement)

將群組態專案加入至 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)

參數

element
ConfigurationElement

還有 ConfigurationElement 一點要補充。

例外狀況

集合中已有同名或類型 element 相同的擴充。

備註

在加法時,只有當鍵相同但值不同時,元素才被視為重複。 鍵與值相同的元素會被靜默接受,因為元素間不競爭。 然而,若元素鍵相同但值不同,則無法加入,因為沒有邏輯判斷應尊重哪兩個競爭值。

適用於

BaseAdd(Int32, ConfigurationElement)

在指定位置為 加入一個配置元素 ExtensionElementCollection。

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)

參數

index
Int32

加入 element的索引位置。

element
ConfigurationElement

還有 ConfigurationElement 一點要補充。

例外狀況

集合中已有同名或類型 element 相同的擴充。

備註

在加法時,只有當鍵相同但值不同時,元素才被視為重複。 鍵與值相同的元素會被靜默接受,因為元素間不競爭。 然而,若元素鍵相同但值不同,則無法加入,因為沒有邏輯判斷應尊重哪兩個競爭值。

適用於