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?
In C#, there are 3 types of comments: Single Line Comments ( // ) Multi Line Comments ( /* */ ) XML Comments ( /// )
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.
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 ( /** ).
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.
As described in this post, use
<see cref="T:byte[]" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With