Writes the outer tags of this configuration element to the configuration file when implemented in a derived class.
Assembly: System.Configuration (in System.Configuration.dll)
Protected Friend Overridable Function SerializeToXmlElement ( _
writer As [%$TOPIC/yxcx3y27_en-us_VS_110_1_0_0_0_0%], _
elementName As [%$TOPIC/yxcx3y27_en-us_VS_110_1_0_0_0_1%] _
) As [%$TOPIC/yxcx3y27_en-us_VS_110_1_0_0_0_2%]
protected internal virtual [%$TOPIC/yxcx3y27_en-us_VS_110_1_0_1_0_0%] SerializeToXmlElement(
[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_1_0_1%] writer,
[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_1_0_2%] elementName
)
protected public:
virtual [%$TOPIC/yxcx3y27_en-us_VS_110_1_0_2_0_0%] SerializeToXmlElement(
[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_2_0_1%]^ writer,
[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_2_0_2%]^ elementName
)
abstract SerializeToXmlElement :
writer:[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_3_0_0%] *
elementName:[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_3_0_1%] -> [%$TOPIC/yxcx3y27_en-us_VS_110_1_0_3_0_2%]
override SerializeToXmlElement :
writer:[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_3_0_3%] *
elementName:[%$TOPIC/yxcx3y27_en-us_VS_110_1_0_3_0_4%] -> [%$TOPIC/yxcx3y27_en-us_VS_110_1_0_3_0_5%]
Parameters
- writer
- Type:
System.XmlXmlWriter
The XmlWriter that writes to the configuration file.
- elementName
- Type:
SystemString
The name of the ConfigurationElement to be written.
| Exception | Condition |
|---|---|
| Exception | The element has multiple child elements. |
The SerializeToXmlElement method is called after the call to the Unmerge method during serialization. The SerializeToXmlElement method writes out the contents of the configuration element between the beginning and ending tags of the element. Override SerializeToXmlElement to provide a custom serialization method.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.