Comment Class

https://dom.spec.whatwg.org/#interface-comment

public sealed class Comment : CharacterData
Inheritance
CharacterData Comment

Constructors

NameDescription
Comment(string)Creates a comment node with the given data.

Comment(string)

CharacterData.cs

Creates a comment node with the given data.

public Comment(string data = "")

Properties

NameDescription
NodeNameGets the name of the node, which is always #comment.
NodeTypeGets the type of the node, which is always COMMENT_NODE.

Gets the name of the node, which is always #comment.

public override string NodeName { get; }

Property value

string

Gets the type of the node, which is always COMMENT_NODE.

public override ushort NodeType { get; }

Property value

ushort