Writes out the XML declaration with the version "1.0".
[Visual Basic] Overloads Overrides Public Sub WriteXmlDecl() [C#] public override void WriteXmlDecl(); [C++] public: override void WriteXmlDecl(); [JScript] public override function WriteXmlDecl();
Exception Type | Condition |
---|---|
InvalidOperationException | This was not the first write call. |
A call to one of the WriteXmlDecl methods must be first write call. The encoding attribute is determined by the implementation. For example, the XmlTextWriter constructor takes an Encoding object which determines the value of the encoding attribute. No standalone attribute is written.
XmlTextWriter Class | XmlTextWriter Members | System.NewXml Namespace | XmlTextWriter.WriteXmlDecl Overload List