WriteComment() public method

Writes a comment /*...*/ containing the specified text.
public WriteComment ( string text ) : void
text string Text to place inside the comment.
return void
        public void WriteComment()
        {
            JTokenWriter writer = new JTokenWriter();

            writer.WriteStartArray();
            writer.WriteComment("fail");
            writer.WriteEndArray();

            StringAssert.AreEqual(@"[
  /*fail*/]", writer.Token.ToString());
        }