How to reference an indexer member of a class in C# comments

后端 未结 5 1296
我寻月下人不归
我寻月下人不归 2021-01-02 07:00

In order to reference a member of a class in XML comments/documentation, you have to use the following tag:


It

5条回答
  •  情话喂你
    2021-01-02 07:37

    In general, in order to find out, how to reference any member in your comments, find the member in your XML documentation file for the assembly. It is created on each build. With the only exception of generics the member reference can be taken from here:

    
    
        
           retrieve a single item of the given name from this instance
        
        name of the item
        the item
    
    
         
        ... 
    

    Unfortunately, generic definition formats seem not to be compatible between the documentation file and the cref tags. While in the XML file, generics look like that:

    
        
        retrieve an named item of the given type
        
        the type of the item to retrieve
        ...
    

    The cref tag expects them in one of the following formats:

    ///    
    
    ///    
    

提交回复
热议问题