How do I reference a C# keyword in XML documentation?

后端 未结 1 1718
陌清茗
陌清茗 2021-01-31 13:28

, for example, doesn\'t work - I get the compilation warning: XML comment on ... has syntactically incorrect cref attribute \'swi

1条回答
  •  醉话见心
    2021-01-31 14:24

    cref is meant to refer to another member - a class, a method etc.

    What would you expect it to link to in this case? In general, what do you want the overall effect to be?

    According to this excellent XML doc guide, the tag has an undocumented attribute langword:

    
    

    Would that help you? It might be worth trying it just to see what it does.

    If you just want to use a normal hyperlink, use href instead of cref:

    switch
    

    0 讨论(0)
提交回复
热议问题