Skip to content

Instantly share code, notes, and snippets.

@Alan-FGR
Last active October 1, 2017 19:38
Show Gist options
  • Save Alan-FGR/9b1191395efaf37c60bde1761681f674 to your computer and use it in GitHub Desktop.
Save Alan-FGR/9b1191395efaf37c60bde1761681f674 to your computer and use it in GitHub Desktop.
Better code comments for C#
Current way has some cool features, but nobody uses them, and SNR is terrible, plus XML is terribly bad too:
/// <summary>
/// Function summary goes here
/// </summary>
/// <param name="param1">Some <i>crazy</i> number</param>
/// <param name="param2">Some <b>bad</b> string</param>
/// <param name="param3">An amazingly nice value</param>
/// <returns>Function returns <see cref="SomeClassType"/></returns>
Proposed new way (to be revised) has excellent SNR, is simple and concise:
/// Function summary goes here
/// param1: Some _crazy_ number
/// param2: Some *bad* string
/// param3: An amazingly nice value
/// returns: Function returns @SomeClassType
Revisions/sugestions are welcome. Once we have something good we'll discuss editor plugins.
@Alan-FGR
Copy link
Author

Alan-FGR commented Oct 1, 2017

Stick to md? I personally don't like [](SomeType), and considering that the vast majority of 'links' will be just refing types, that's overkill, we better go with some tags to wrap our stuff, or maybe even some special character to mark the beginning of a type since it can't contain spaces anyway, maybe something like this method returns @SomeType class etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment