views:

216

answers:

2

I know this maybe a basic question but I just can't seem to find the answer anywhere.

I have a class like this

Table<T>
{}

then I have some code that uses the above class that I would like to comment I would like to be able to do something like:

/// <summary>
/// blah blah blah Table<String>
/// </summary>

But I can't use the angle bracket in the comment as it thinks it's a tag and when the help shows up it just has an error about no end tag for .

How do I show generic classes in comments in Visual Studio.

+1  A: 

try using an &lt; instead of a <

Tim Howland
+1  A: 

You need to use XML entities (sort of escape sequences): &lt; for < and &gt; for >. Intellisense will display < as and > correctly.

EDIT: Here's a cheat sheet listing of all of the XML entities:

&lt;   for <
&gt;   for >
&amp;  for &
&quot; for "
&apos; for '
DrJokepu