Referncing generic in XML comments

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

A have a generic class - InfoCollection<T>

The code comment for my constructor is:
/// <summary>
/// Instantiates a new instances of the <see
cref="InfoCollection[T]"/> class.
/// </summary>

I get a warning in the compilation saying that the comment has syntactically
incorrect cref attribute.

How can I write my comment correctly. ?
 
A have a generic class - InfoCollection<T>

The code comment for my constructor is:
/// <summary>
/// Instantiates a new instances of the <see
cref="InfoCollection[T]"/> class.
/// </summary>

I get a warning in the compilation saying that the comment has syntactically
incorrect cref attribute.

How can I write my comment correctly. ?

Use braces instead of square brackets:

<see cref="InfoCollection{T}" />

(Intellisense may help if you hit Ctrl-Space after typing InfoCol - or
that could just be ReSharper on my box.)

Jon
 
Back
Top