c# - How to add List type code example in XML comment? -


i have used below xml comment,

    /// <example>      /// example shows how use <see cref="samplecollection"/> property.     /// <code>     /// class testclass      /// {     ///      list<string> collection = new list<string>();     ///      collection.add("column1");     ///      collection.add("column2");     ///      this.samplecollection = collection;     /// }     /// </code>     /// </example>             public list<string> samplecollection     {         get;         set;     } 

but has following warning error,

xml comment on 'samplecollection' has badly formed xml -- 'end tag 'code' not match start tag 'string'.'

because list definition has <string>. considered xml tag.

is there way resolve this?

use cdata block embed raw text within xml:

<![cdata[ list<string> ... ]]> 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -