1

I've just started using /// <summary> format comments so as to document my classes. I'm liking how professional it looks, but I'm a little confused about the <returns></returns> block.

It doesn't actually seem to put anything I type there into intellisense. If a function returns a String, I type "String" into there or "DataSet" if the function returns a DataSet, but it never appears.

This is a sample of a comment I've currently got in the class. I tried to input the HTML literal values for < > characters here. It didn't work, nor does it work just the word "List" in it...

    /// <summary>
    /// Get a list of users.
    /// </summary>
    /// <returns>returns List&lt;User&gt;</returns>

This produces the following text in Intellisense:

[function information here including function name, return type and parameters]
Get a list of users.

What I'm looking for looks more like:

[function information here including function name, return type and parameters]
Get a list of users.
returns List<User>

So is there a native way to make this happen?

gunr2171
  • 16,104
  • 25
  • 61
  • 88
Ortund
  • 8,095
  • 18
  • 71
  • 139
  • 2
    Where's the example of what you've tried? – Vsevolod Goloviznin Jan 06 '15 at 13:30
  • 2
    Please only ask one question per post. – dav_i Jan 06 '15 at 13:31
  • @Plutonix did the "possible duplicate" question also refer to the `` block not showing anything? No it doesn't, so please explain how this is a duplicate question? – Ortund Jan 06 '15 at 13:34
  • 3
    http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2317525-show-returns-and-value-contents-of-xml-documen – Hans Passant Jan 06 '15 at 13:36
  • 1
    The is part of a tooltip hint generated by the xml documenter. You are suppose to describe what is being returned, not the type – Bernd Linde Jan 06 '15 at 13:41
  • @BerndLinde the xml documenter cares about what value is supplied for the key? That's clever though it didn't seem to like arbitrary text either... – Ortund Jan 06 '15 at 13:47
  • 2
    Actually it's answered [here](http://stackoverflow.com/questions/1006042/intellisense-tip-and-xml-returns-comment-vs2008): "Intellisense cannot display RETURNS statement indeed". – Shadow The GPT Wizard Jan 06 '15 at 14:17
  • @ShadowWizard funny how all the people who cried about duplicate questions failed to notice the one question where it had been answered. You're the first useful person I've encountered on here all day! – Ortund Jan 06 '15 at 14:26

0 Answers0