XmlWriter.WriteName Method
.NET Framework 4
When overridden in a derived class, writes out the specified name, ensuring it is a valid name according to the W3C XML 1.0 recommendation (http://www.w3.org/TR/1998/REC-xml-19980210#NT-Name).
Assembly: System.Xml (in System.Xml.dll)
| Exception | Condition |
|---|---|
| ArgumentException |
name is not a valid XML name; or name is either null or String.Empty. |
If Namespaces is set to true, WriteName also checks that the name is also valid according to the W3C Namespaces in XML recommendation.
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.