public void WriteEndComment() {
Debug.Assert(this.xstate == XmlState.WithinComment, "WriteEndComment cannot be called in the " + this.xstate + " state.");
Writer.WriteComment(this.commentText);
this.xstate = XmlState.WithinContent;
this.depth--;
if (this.depth == 0)
EndTree();
}