Language

ConfigurationElementCollection.CreateNewElement メソッド

定義

派生クラスでオーバーライドされた場合は、新しい ConfigurationElementを作成します。

オーバーロード

名前 説明
CreateNewElement(String)

派生クラスでオーバーライドされたときに新しい ConfigurationElement を作成します。

CreateNewElement()

派生クラスでオーバーライドされた場合は、新しい ConfigurationElementを作成します。

注釈

CreateNewElement メソッドをオーバーライドして、特定の型のカスタム ConfigurationElement オブジェクトを作成します。 構成ファイルからコレクションが読み込まれると、 CreateNewElement が呼び出され、個々の要素が作成されます。 CreateNewElement は、 ConfigurationElementCollection クラスから派生するクラスでオーバーライドする必要があります。

CreateNewElement(String)

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

派生クラスでオーバーライドされたときに新しい ConfigurationElement を作成します。

protected:
 virtual System::Configuration::ConfigurationElement ^ CreateNewElement(System::String ^ elementName);
protected virtual System.Configuration.ConfigurationElement CreateNewElement(string elementName);
abstract member CreateNewElement : string -> System.Configuration.ConfigurationElement
override this.CreateNewElement : string -> System.Configuration.ConfigurationElement
Protected Overridable Function CreateNewElement (elementName As String) As ConfigurationElement

パラメーター

elementName
String

作成する ConfigurationElement の名前。

返品

指定した名前の新しい ConfigurationElement 。

注釈

CreateNewElement メソッドをオーバーライドして、特定の型のカスタム ConfigurationElement オブジェクトを作成します。 構成ファイルからコレクションが読み込まれると、 CreateNewElement が呼び出され、個々の要素が作成されます。 CreateNewElement は、 ConfigurationElementCollection クラスから派生するクラスでオーバーライドする必要があります。

注意 (継承者)

異種ConfigurationElementCollection型を含むカスタム ConfigurationElement コレクションを作成する場合は、次の手順を実行する必要があります。

適用対象

CreateNewElement()

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

派生クラスでオーバーライドされた場合は、新しい ConfigurationElementを作成します。

protected:
 abstract System::Configuration::ConfigurationElement ^ CreateNewElement();
protected abstract System.Configuration.ConfigurationElement CreateNewElement();
abstract member CreateNewElement : unit -> System.Configuration.ConfigurationElement
Protected MustOverride Function CreateNewElement () As ConfigurationElement

返品

新しく作成された ConfigurationElement。

例

次のコード例は、 CreateNewElement メソッドをオーバーライドする方法を示しています。

protected override ConfigurationElement CreateNewElement()
{
    return new UrlConfigElement();
}
Protected Overloads Overrides Function CreateNewElement() As ConfigurationElement
    Return New UrlConfigElement()
End Function

注釈

CreateNewElement メソッドをオーバーライドして、特定の型のカスタム ConfigurationElement オブジェクトを作成します。 構成ファイルからコレクションが読み込まれると、 CreateNewElement が呼び出され、個々の要素が作成されます。 CreateNewElement は、 ConfigurationElementCollection クラスから派生するクラスでオーバーライドする必要があります。

適用対象