Using C#'s XML comment cref attribute with params syntax

前端 未结 3 1451
粉色の甜心
粉色の甜心 2020-12-24 08:58

In C#, I am trying to use to reference a method signature that contains the params keyword. I know this converts the parameter list to an array,

3条回答
  •  天涯浪人
    2020-12-24 09:03

    The ECMA 334 Standard PDF, Annex E contains a decent overview of XML Documentation comments. You can download the standard at:

    http://www.ecma-international.org/publications/standards/Ecma-334.htm

    Specifically, you'll want section E.3.1, starting on page 496.

    Similar content is also at MSDN (though MSDN seems to have terrible navigation on this topic, making it difficult to find the other sections):

    http://msdn.microsoft.com/en-us/library/aa664787(VS.71).aspx

    The equivalent to E.3.1:

    http://msdn.microsoft.com/en-us/library/aa664807(VS.71).aspx

    You may also find Mono's documentation useful:

    http://www.go-mono.com/docs/index.aspx?tlink=29@man%3amdoc(5)

    Specfically, the "CREF FORMAT" section covers the ID string conventions.

    Update 2018/05/23

    The URL for the ECMA-334 standard PDF above links to the latest edition of the standard. In 2009, that was the 4th edition of the standard. However, as of December 2017, the 5th edition is current, and section E.3.1 from the 4th edition became section D.4.2 in the 5th edition.

    The previous versions of the ECMA-334 standard are available for download from the following page: https://www.ecma-international.org/publications/standards/Ecma-334-arch.htm

提交回复
热议问题