ConfigurationElementCollection.CreateNewElement 메서드

정의

파생 클래스에서 재정의할 때 새 ConfigurationElement를 만듭니다.

오버로드

CreateNewElement(String)

파생 클래스에서 재정의될 때 새 ConfigurationElement를 만듭니다.

CreateNewElement()

파생 클래스에서 재정의할 때 새 ConfigurationElement를 만듭니다.

설명

메서드를 재정의 CreateNewElement 하여 특정 형식의 사용자 지정 ConfigurationElement 개체를 만듭니다. 구성 파일 CreateNewElement 에서 컬렉션을 로드할 때 개별 요소를 만들기 위해 가 호출됩니다. CreateNewElement 는 클래스에서 파생되는 클래스에서 재정의 ConfigurationElementCollection 되어야 합니다.

CreateNewElement(String)

Source:
ConfigurationElementCollection.cs
Source:
ConfigurationElementCollection.cs
Source:
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 되어야 합니다.

상속자 참고

다른 유형의 ConfigurationElement 형식을 포함하는 사용자 지정 ConfigurationElementCollection 컬렉션을 만드는 경우 다음 단계를 수행해야 합니다.

적용 대상

CreateNewElement()

Source:
ConfigurationElementCollection.cs
Source:
ConfigurationElementCollection.cs
Source:
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 되어야 합니다.

적용 대상