How do you add < (less than) or > (greater than) to a summary comment in visual studio? I am in Visual Studio 2008.
I have a generic method:
public bool IsMemberProtected<T>(Expression<Func<T, object>> expression)
Would love to have a summary tag of something like this
/// <summary> /// Determines whether a member is protected. /// /// Usage: IsMemberProtected<ExampleType>(x => x.Member) /// </summary>
But when I do that, the tooltip for the property no longer works when a developer hovers over the method in code to view the summary tag.
Thoughts?
You can use the entities <
and >
to give <
and >
respectively.
Notice that here you also use <
and >
to write a generic type. In this case there is a convention that if you use a cref
tag then you can use GenericType{T}
instead of the uglier GenericType<T>
. See here for more information.
Also from that page there is another suggestion if you have to write a lot of <
and >
symbols that you put the text in a CDATA section:
/// <summary>
/// This a simple collection which implements <see cref="IEnumerable{T}" />
/// </summary>
/// <example>
/// <![CDATA[
/// SimpleList<int> intList = new SimpleList<int>();
/// ]]>
/// </example>
i think this may help you.
Right-click on the function, select "Document this" for Ex.
public void Function_Name()
becomes
/// <summary>
/// Give the details here
/// </summary>
/// <param name=""></param>
/// <returns> you can tel what it returns </returns>
public void Function_Name()
(it is all auto generated).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With