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).
- name
- A string specifying the name to write.
Type Reason ArgumentException name is null or string.Empty; or name is not a valid XML Name. InvalidOperationException The XmlTextWriter.WriteState is WriteState.Closed.
If XmlTextWriter.Namespaces is set to true, this method checks that name is also valid according to the W3C Namespaces in XML recommendation (http://www.w3.org/TR/REC-xml-names).
Note:This method overrides XmlWriter.WriteName(string).
Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0