Repository navigation
Revised xml doc comments topic for csproj - #1548
Conversation
mairaw
left a comment
There was a problem hiding this comment.
I like your edits @rpetrusha! Found a few things to fix.
| XML documentation comments, like all other comments, are ignored by the compiler. | ||
|
|
||
| XML documentation comments are characterized by triple forward slashes (`///`) and an XML formatted comment body. | ||
| You can generate the XML file at compile type by doing one of the following: |
There was a problem hiding this comment.
compile type -> compile time?
| <DocumentationFile>bin\Debug\netcoreapp1.0\App.xml</DocumentationFile> | ||
| ``` | ||
|
|
||
| -- If you are developing an application using Visual Studio, right-click on the project and select **Properties**. In the properties dialog, select the **Build** tab, and check **XML documentation file:**. You can also change the location to which the compiler writes the file. |
There was a problem hiding this comment.
remove one of the dashes
style guide: If a command label ends with a colon or an ellipsis, don’t include that end punctuation in instructions.
|
|
||
| -- If you are developing an application using Visual Studio, right-click on the project and select **Properties**. In the properties dialog, select the **Build** tab, and check **XML documentation file:**. You can also change the location to which the compiler writes the file. | ||
|
|
||
| -- If you are compiling a .NET Framework application from the command line, add the [/doc compiler option](language-reference/compiler-options/doc-compiler-option.md) when compiling. |
| ## See also | ||
| [XML Documentation Comments (C# Programming Guide)](programming-guide/xmldoc/xml-documentation-comments.md) | ||
|
|
||
| [Recommended Tags for Documentation Comments (C# Programming Guide)](programming-guide/xmldoc/recommended-tags-for-documentation-comments) |
|
|
||
| You use the `<remarks>` tag to add information about types or members, supplementing the information specified with `<summary>`. | ||
| In this example you'll just add it to the class. | ||
| The `<remarks>` tag to supplements the information about types or members that the `<summary>` tag provides. In this example you'll just add it to the class. |
There was a problem hiding this comment.
to supplements -> supplements
missing comma after example
| Good news is there's a way to let your developers know that certain methods can throw certain exceptions and that's by using the `<exception>` tag. | ||
| Looking at your little Math library you can see that both `Add` methods throw an exception if a certain condition is met, not so obvious though | ||
| By using the `<exception>` tag, you let your developers know that a method can throw specific exceptions. | ||
| Looking at your Math library you can see that both `Add` methods throw an exception if a certain condition is met, not so obvious though |
There was a problem hiding this comment.
should you style Math as inline code?
|
|
||
| While documenting your code with XML tags you might reach a point where you need to add some sort of reference to another part of the code to make your reader understand it better. | ||
| The `<see>` tag is one that let's you create clickable links to documentation pages for other code elements. In our next example we'll create a clickable link between the two `Add` methods. | ||
| The `<see>` tag lets you create a clickable link to a documentation page for another code element. In our next example we'll create a clickable link between the two `Add` methods. |
There was a problem hiding this comment.
nit: missing comma after example
|
|
||
| } | ||
| ``` | ||
|
|
There was a problem hiding this comment.
existing typo below: intergers (it shows up more than once)
|
|
||
| As the name suggests you use the `<returns>` tag in the comment for a method declaration to describe its return value. | ||
| The `<returns>` tag describes the return value of a method declaration. | ||
| Like before this will be illustrated on the first `Add` method go ahead an implement it on other methods. |
There was a problem hiding this comment.
missing comma after before,
the second part of the sentence needs work. It should probably be rewritten to something like:
Add method. You can do the same on other methods.
| @@ -1259,8 +1269,13 @@ that need to be taken into consideration when using XML documentation tags in yo | |||
|
|
|||
|
Thanks for catching all of these, @mairaw! I've made the corrections, and fixed a few more things (especially that floating-point division doesn't throw a |
mairaw
left a comment
There was a problem hiding this comment.
LGTM! Good catch on the exception, I missed that one while reviewing it. ![]()
Revised xml doc comments topic for csproj
Summary
Revised for csproj files in .NET Core, as well as Visual Studio and .NET Framework from the command line. Also did a very, very, very quick edit pass.
Fixes #1542