ConfigurationElementCollectionBase<T>.CreateElement Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a new child element for the current collection.
Overloads
CreateElement() |
Creates a new child element for the current collection. |
CreateElement(String) |
Creates a new child element by using the specified name. |
CreateElement()
Creates a new child element for the current collection.
public:
T CreateElement();
public T CreateElement ();
member this.CreateElement : unit -> 'T
Public Function CreateElement () As T
Returns
A reference to the strongly typed configuration element that was created.
Remarks
This overload creates an element by using the <add>
element name defined in the configuration schema. To specify the name of the child item being created, use the CreateElement(String) overload, which takes a string parameter.
Applies to
CreateElement(String)
Creates a new child element by using the specified name.
public:
T CreateElement(System::String ^ elementTagName);
public T CreateElement (string elementTagName);
member this.CreateElement : string -> 'T
Public Function CreateElement (elementTagName As String) As T
Parameters
- elementTagName
- String
The name of the element to create
Returns
A reference to the strongly typed configuration element that was created.
Remarks
This overload creates an element by using the element name provided in the elementTagName
parameter. To use the <add>
element name defined in the configuration schema, use the CreateElement() overload, which takes no parameters.