runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Cleanup /**/ style comments in C#

Open danmoseley opened this issue 8 years ago • 2 comments

There are still about 50 comments like

            /***
             * Div96By32
             *
             * .....
             ***********************************************************************/

in System.Private.Corelib. These should all be converted to XML format (or removed, if they are not worth keeping) to be consistent with our other C# code.

danmoseley avatar Oct 09 '18 21:10 danmoseley

Could I work on this one? Can you show me any example of the correct format for the comments?

JorgeAndd avatar Oct 11 '18 19:10 JorgeAndd

I think the intended format would be a classic xml comment like this: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments

In this particular example the original comment in the codebase is:

/***
 * Div96By32
 *
 * Entry:
 *   bufNum - 96-bit dividend as array of ULONGs, least-sig first
 *   ulDen   - 32-bit divisor.
 *
 * Purpose:
 *   Do full divide, yielding 96-bit result and 32-bit remainder.
 *
 * Exit:
 *   Quotient overwrites dividend.
 *   Returns remainder.
 *
 * Exceptions:
 *   None.
 *
 ***********************************************************************/
private static uint Div96By32(ref Buf12 bufNum, uint ulDen)

and should have been something like:

/// <summary>
/// Do full divide, yielding 96-bit result and 32-bit remainder.
/// </summary>
/// <param name="bufNum">96-bit dividend as array of ULONGs, least-sig first</param>
/// <param name="ulDen">32-bit divisor</param>
/// <returns>remainder</returns>
private static uint Div96By32(ref Buf12 bufNum, uint ulDen)

ablanchet avatar Oct 17 '18 18:10 ablanchet