Creates a new ConfigurationElement when overridden in a derived class.
Protected Overridable Function CreateNewElement ( _ elementName As String _ ) As ConfigurationElement
Dim elementName As String Dim returnValue As ConfigurationElement returnValue = Me.CreateNewElement(elementName)
protected virtual ConfigurationElement CreateNewElement( string elementName )
protected: virtual ConfigurationElement^ CreateNewElement( String^ elementName )
protected function CreateNewElement( elementName : String ) : ConfigurationElement
Override the CreateNewElement method to create custom ConfigurationElement objects of a specific type. When a collection is loaded from the configuration file, CreateNewElement is called to create individual elements. CreateNewElement must be overridden in classes that derive from the ConfigurationElementCollection class.
The following code example shows how to override the CreateNewElement method.
Protected Overloads Overrides Function CreateNewElement( _ ByVal elementName As String) _ As ConfigurationElement Return New UrlConfigElement(elementName) End Function 'CreateNewElement
protected override ConfigurationElement CreateNewElement( string elementName) { return new UrlConfigElement(elementName); }
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98