How do I generate these kind of summaries in Visual Studio?
///
/// Returns a number
///
///
As others have said, Visual Studio will, by default, add the documentation template automatically when you type three slashes in a row above the member declaration. If the member has any Attributes applied to it, then type the slashes on the line above the attributes.
Note, however, that one of the most useful things to document for a method (or constructer, property, etc.) is the exceptions that the method may generate. Those can be added by typing ///
If any parameters are added to a method after the documentation is already produced, then the Intellisense will also be very helpful in filling in the new paramter name when you go to add it to the documentation. It is a pretty slick feature.