Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refer to array types in documentation comments

I just posted this question and learned about <see cref="">, however when i tried

/// This is a set of extensions that allow more operations on a <see cref="byte[]"/>. 

The compiler gave me warnings about it not being formatted correctly. What do I need to do so it will see the code reference correctly?

like image 647
Scott Chamberlain Avatar asked Mar 02 '10 22:03

Scott Chamberlain


People also ask

What are the three types of comments in C#?

In C#, there are 3 types of comments: Single Line Comments ( // ) Multi Line Comments ( /* */ ) XML Comments ( /// )

What sequence of characters indicates the start of an XML style documentation comment in C# code?

The only part of the following comment that's processed is the line that begins with <summary> . The three tag formats produce the same comments. The compiler identifies a common pattern of " * " at the beginning of the second and third lines. The pattern isn't included in the output.

How do you comment a method in C#?

Comments having a certain form can be used to direct a tool to produce XML from those comments and the source code elements that they precede. Such comments are Single-Line_Comments (§6.3. 3) that start with three slashes ( /// ), or Delimited_Comments (§6.3. 3) that start with a slash and two asterisks ( /** ).

What is XML comment in C#?

C# documentation comments use XML elements to define the structure of the output documentation. One consequence of this feature is that you can add any valid XML in your documentation comments. The C# compiler copies these elements into the output XML file.


1 Answers

As described in this post, use

 <see cref="T:byte[]" /> 
like image 53
Timores Avatar answered Sep 22 '22 06:09

Timores