Language

ConfigurationElementCollection.BaseAdd メソッド

定義

派生クラスでオーバーライドされると、ConfigurationElement インスタンスにConfigurationElementCollectionを追加します。

オーバーロード

名前 説明
BaseAdd(ConfigurationElement)

構成要素を ConfigurationElementCollectionに追加します。

BaseAdd(ConfigurationElement, Boolean)

構成要素コレクションに構成要素を追加します。

BaseAdd(Int32, ConfigurationElement)

構成要素コレクションに構成要素を追加します。

注釈

BaseAdd メソッドを使用して、新しいConfigurationElementをコレクションに追加します。 要素の追加時にカスタム動作が必要な場合は、派生クラスでオーバーライドします。

要素を追加すると、キーが同一であっても値が異なる場合にのみ、要素が重複していると見なされます。 同じキーと値を持つ要素は、要素が競合しないため、サイレントモードで受け入れられます。 ただし、同一のキーを持つ要素が異なる値を追加することはできません。どの競合値を受け入れるかを判断するロジックがないためです。

BaseAdd(ConfigurationElement)

ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs

構成要素を ConfigurationElementCollectionに追加します。

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

パラメーター

element
ConfigurationElement

追加する ConfigurationElement 。

例

次のコード例は、 BaseAdd メソッドをオーバーライドする方法と、 Add メソッドから呼び出す方法を示しています。

public void Add(UrlConfigElement url)
{
    BaseAdd(url);

    // Your custom code goes here.
}
Public Sub Add(ByVal url As UrlConfigElement)
    BaseAdd(url)

    ' Your custom code goes here.

End Sub

注釈

BaseAdd メソッドを使用して、新しいConfigurationElementをコレクションに追加します。 要素の追加時にカスタム動作が必要な場合は、派生クラスでオーバーライドします。

要素を追加すると、キーが同一であっても値が異なる場合にのみ、要素が重複していると見なされます。 同じキーと値を持つ要素は、要素が競合しないため、サイレントモードで受け入れられます。 ただし、同一のキーを持つ要素が異なる値を追加することはできません。どの競合値を受け入れるかを判断するロジックがないためです。

適用対象

BaseAdd(ConfigurationElement, Boolean)

ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs

構成要素コレクションに構成要素を追加します。

protected public:
 void BaseAdd(System::Configuration::ConfigurationElement ^ element, bool throwIfExists);
protected:
 void BaseAdd(System::Configuration::ConfigurationElement ^ element, bool throwIfExists);
protected internal void BaseAdd(System.Configuration.ConfigurationElement element, bool throwIfExists);
protected void BaseAdd(System.Configuration.ConfigurationElement element, bool throwIfExists);
member this.BaseAdd : System.Configuration.ConfigurationElement * bool -> unit
Protected Friend Sub BaseAdd (element As ConfigurationElement, throwIfExists As Boolean)
Protected Sub BaseAdd (element As ConfigurationElement, throwIfExists As Boolean)

パラメーター

element
ConfigurationElement

追加する ConfigurationElement 。

throwIfExists
Boolean

true 指定した ConfigurationElement が既に ConfigurationElementCollectionに含まれている場合は例外をスローします。それ以外の場合は false。

例外

追加する ConfigurationElement は既に ConfigurationElementCollection に存在し、 throwIfExists パラメーターは true。

注釈

指定したthrowIfExists オブジェクトが既にException コレクションに存在する場合は、省略可能なパラメーター ConfigurationElementを使用してConfigurationElementCollection例外をスローします。

要素は、キーが同一であっても値が異なる場合にのみ、重複と見なされます。 同じキーと値を持つ要素は、要素が競合しないため、サイレントモードで受け入れられます。 ただし、同一のキーを持つ要素が異なる値を追加することはできません。どの競合値を受け入れるかを判断するロジックがないためです。

適用対象

BaseAdd(Int32, ConfigurationElement)

ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs
ソース:
ConfigurationElementCollection.cs

構成要素コレクションに構成要素を追加します。

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

パラメーター

index
Int32

指定した ConfigurationElementを追加するインデックスの場所。

element
ConfigurationElement

追加する ConfigurationElement 。

注釈

index パラメーターを使用して、特定のインデックス位置にあるConfigurationElementにConfigurationElementCollection オブジェクトを追加します。

適用対象