我使用了以下XML评论,
/// <example>
/// This example shows how to 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;
}
Run Code Online (Sandbox Code Playgroud)
但它有以下警告错误,
关于'SampleCollection'的XML注释格式错误 - '结束标记'代码'与开始标记'字符串'不匹配.
因为List定义有<string>.所以它认为是XML标签.
有什么方法可以解决这个问题吗?