WriteComment()

XmlTextWriter::WriteComment(String) method

Writes out a comment containing the specified text.

void System::Xml::XmlTextWriter::WriteComment(String text) override

Arguments

ParameterTypeDescription
textStringText to place inside the comment.

Exceptions

ExceptionDescription
ArgumentExceptionThe text would result in a non-well formed XML document.
InvalidOperationExceptionThe XmlTextWriter::get_WriteState value is WriteState::Closed.

See Also