Compiler Warning (level 1) CS1570

XML comment on 'construct' has badly formed XML — 'reason'

When using /doc, any comments in the source code must be in XML. Any error with your XML markup will generate CS1570. For example:

  • If you are passing a string to a cref, such as in an <exception> tag, the string must be enclosed in double quotation marks.

  • If you are using a tag, such as <seealso>, which does not have a closing tag, you must specify a forward slash before the closing angle bracket.

  • If you need to use a greater-than or less-than symbol in the text of description, you need to represent them with > or <.

  • The file or path attribute on an <include> tag was missing or improperly formed.

The following sample generates CS1570:

// CS1570.cs  
// compile with: /W:1  
namespace ns  
{  
   // the following line generates CS1570  
   /// <summary> returns true if < 5 </summary>  
   // try this instead  
   // /// <summary> returns true if <5 </summary>  
  
   public class MyClass  
   {  
      public static void Main ()  
      {  
      }  
   }  
}