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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top