This documentation is archived and is not being maintained.

XmlWriter.WriteName Method

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 (

[Visual Basic]
Public MustOverride Sub WriteName( _
   ByVal name As String _
public abstract void WriteName(
 string name
public: virtual void WriteName(
 String* name
) = 0;
public abstract function WriteName(
   name : String


The name to write.


Exception Type Condition
ArgumentException name is not a valid XML name; or name is either a null reference (Nothing in Visual Basic) 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.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

XmlWriter Class | XmlWriter Members | System.Xml Namespace