This documentation is archived and is not being maintained.
ConfigurationElementCollection.SerializeElement Method
Visual Studio 2010
Writes the configuration data to an XML element in the configuration file when overridden in a derived class.
Assembly: System.Configuration (in System.Configuration.dll)
'Declaration Protected Friend Overrides Function SerializeElement ( _ writer As XmlWriter, _ serializeCollectionKey As Boolean _ ) As Boolean
Parameters
- writer
- Type: System.Xml.XmlWriter
Output stream that writes XML to the configuration file.
- serializeCollectionKey
- Type: System.Boolean
true to serialize the collection key; otherwise, false.
Return Value
Type: System.Booleantrue if the ConfigurationElementCollection was written to the configuration file successfully.
| Exception | Condition |
|---|---|
| ArgumentException | One of the elements in the collection was added or replaced and starts with the reserved prefix "config" or "lock". |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: