In my C# XML Comment's <return>
comment, I would like the output (I'm using Sandcastle) to specify the Type that is returned, but I am unable to find out how to do that.
Psuedo Example:
///<summary>
///Serves as a hash function for a particular type.
///</summary>
///<returns **Type="System.Int32"**>
///A hash code for the current Object.
///</returns>
public virtual int GetHashCode(){...}
The example above is a mock of what my guess is to tell Sandcastle how to specify the return type that is documented in the Syntax
section of the documentation - not so.
For clarity, here is a screenshot of MSDN's documentation of the GetHastCode() method that shows the return type that I'm shooting for.
Do we have to manually specify the Type, or can we specify a Type (similar to the mock example) and let Sandcastle determine how to display/format the output - similar to how Sandcastle automatically displays/formats the Type for parameters via the <param>
tag.
This post (July 2011) has a response from Eric Woodruff (SHFB Author) regarding the lack of the return type being displayed within the <return>
tag:
Sandcastle doesn't render the type information for the return information and I don't think it ever has. Provided the information is in the reflection information file, the XSL transformations could be modified to render it. I don't have time to look into it now but may be able to at some point to find out if its possible.
I suppose the official answer to my OP is; Sandcastle doesn't have an automatic way of specifying the return Type but, like Skeet already alluded to, it may be possible to accomplish this by modifying the XSL transformations.