You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The \<c> tag gives you a way to indicate that text within a description should be marked as code. Use [\<code>](./code.md) to indicate multiple lines as code.
30
+
The `<c>` tag gives you a way to indicate that text within a description should be marked as code. Use [\<code>](./code.md) to indicate multiple lines as code.
31
31
32
32
Compile with [-doc](../../language-reference/compiler-options/doc-compiler-option.md) to process documentation comments to a file.
The \<code> tag gives you a way to indicate multiple lines as code. Use [\<c>](./code-inline.md) to indicate that text within a description should be marked as code.
28
+
The `<code>` tag is used to indicate multiple lines of code. Use [\<c>](./code-inline.md) to indicate that single-line text within a description should be marked as code.
29
29
30
30
Compile with [-doc](../../language-reference/compiler-options/doc-compiler-option.md) to process documentation comments to a file.
31
31
32
32
## Example
33
33
34
-
See the [\<example>](./example.md)topic for an example of how to use the \<code> tag.
34
+
See the [\<example>](./example.md)article for an example of how to use the `<code>` tag.
Copy file name to clipboardExpand all lines: docs/csharp/programming-guide/xmldoc/delimiters-for-documentation-tags.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,10 @@ The use of XML doc comments requires delimiters, which indicate to the compiler
13
13
14
14
-`///`
15
15
16
-
Single-line delimiter. This is the form that is shown in documentation examples and used by the Visual C# project templates. If there is a white space character following the delimiter, that character is not included in the XML output.
16
+
Single-line delimiter. This is the form that is shown in documentation examples and used by the C# project templates. If there is a white space character following the delimiter, that character is not included in the XML output.
17
17
18
18
> [!NOTE]
19
-
> The Visual Studio IDE has a feature called Smart Comment Editing that automatically inserts the \<summary> and \</summary> tags and moves your cursor within these tags after you type the `///` delimiter in the Code Editor. You can turn this feature on or off in the [Options dialog box](/visualstudio/ide/reference/options-text-editor-csharp-advanced).
19
+
> The Visual Studio integrated development environment (IDE) automatically inserts the `<summary>` and `</summary>` tags and moves your cursor within these tags after you type the `///` delimiter in the code editor. You can turn this feature on or off in the [Options dialog box](/visualstudio/ide/reference/options-text-editor-csharp-advanced).
20
20
21
21
-`/** */`
22
22
@@ -26,13 +26,13 @@ The use of XML doc comments requires delimiters, which indicate to the compiler
26
26
27
27
- On the line that contains the `/**` delimiter, if the remainder of the line is white space, the line is not processed for comments. If the first character after the `/**` delimiter is white space, that white space character is ignored and the rest of the line is processed. Otherwise, the entire text of the line after the `/**` delimiter is processed as part of the comment.
28
28
29
-
- On the line that contains the `*/` delimiter, if there is only white space up to the `*/` delimiter, that line is ignored. Otherwise, the text on the line up to the `*/` delimiter is processed as part of the comment, subject to the pattern-matching rules described in the following bullet.
29
+
- On the line that contains the `*/` delimiter, if there is only white space up to the `*/` delimiter, that line is ignored. Otherwise, the text on the line up to the `*/` delimiter is processed as part of the comment.
30
30
31
31
- For the lines after the one that begins with the `/**` delimiter, the compiler looks for a common pattern at the beginning of each line. The pattern can consist of optional white space and an asterisk (`*`), followed by more optional white space. If the compiler finds a common pattern at the beginning of each line that does not begin with the `/**` delimiter or the `*/` delimiter, it ignores that pattern for each line.
32
32
33
33
The following examples illustrate these rules.
34
34
35
-
- The only part of the following comment that will be processed is the line that begins with `<summary>`. The three tag formats produce the same comments.
35
+
- 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.
36
36
37
37
```csharp
38
38
/** <summary>text</summary> */
@@ -71,7 +71,7 @@ The use of XML doc comments requires delimiters, which indicate to the compiler
The \<example> tag lets you specify an example of how to use a method or other library member. This commonly involves using the [\<code>](./code.md) tag.
28
+
The `<example>` tag lets you specify an example of how to use a method or other library member. This commonly involves using the [\<code>](./code.md) tag.
29
29
30
30
Compile with [-doc](../../language-reference/compiler-options/doc-compiler-option.md) to process documentation comments to a file.
The \<exception> tag lets you specify which exceptions can be thrown. This tag can be applied to definitions for methods, properties, events, and indexers.
34
+
The `<exception>` tag lets you specify which exceptions can be thrown. This tag can be applied to definitions for methods, properties, events, and indexers.
35
35
36
36
Compile with [-doc](../../language-reference/compiler-options/doc-compiler-option.md) to process documentation comments to a file.
Copy file name to clipboardExpand all lines: docs/csharp/programming-guide/xmldoc/how-to-use-the-xml-documentation-features.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -102,28 +102,28 @@ The example generates an *.xml* file with the following contents.
102
102
103
103
## Compiling the code
104
104
105
-
To compile the example, type the following command line:
105
+
To compile the example, enter the following command:
106
106
107
107
`csc XMLsample.cs /doc:XMLsample.xml`
108
108
109
-
This command creates the XML file *XMLsample.xml*, which you can view in your browser or by using the TYPE command.
109
+
This command creates the XML file *XMLsample.xml*, which you can view in your browser or by using the `TYPE` command.
110
110
111
111
## Robust programming
112
112
113
-
XML documentation starts with ///. When you create a new project, the wizards put some starter /// lines in for you. The processing of these comments has some restrictions:
113
+
XML documentation starts with `///`. When you create a new project, the wizards put some starter `///` lines in for you. The processing of these comments has some restrictions:
114
114
115
115
- The documentation must be well-formed XML. If the XML is not well-formed, a warning is generated and the documentation file will contain a comment that says that an error was encountered.
116
116
117
117
- Developers are free to create their own set of tags. There is a [recommended set of tags](recommended-tags-for-documentation-comments.md). Some of the recommended tags have special meanings:
118
118
119
-
- The \<param> tag is used to describe parameters. If used, the compiler verifies that the parameter exists and that all parameters are described in the documentation. If the verification failed, the compiler issues a warning.
119
+
- The `<param>` tag is used to describe parameters. If used, the compiler verifies that the parameter exists and that all parameters are described in the documentation. If the verification fails, the compiler issues a warning.
120
120
121
-
- The `cref` attribute can be attached to any tag to provide a reference to a code element. The compiler verifies that this code element exists. If the verification failed, the compiler issues a warning. The compiler respects any `using` statements when it looks for a type described in the `cref` attribute.
121
+
- The `cref` attribute can be attached to any tag to reference a code element. The compiler verifies that this code element exists. If the verification fails, the compiler issues a warning. The compiler respects any `using` statements when it looks for a type described in the `cref` attribute.
122
122
123
-
- The \<summary> tag is used by IntelliSense inside Visual Studio to display additional information about a type or member.
123
+
- The `<summary>` tag is used by IntelliSense inside Visual Studio to display additional information about a type or member.
124
124
125
125
> [!NOTE]
126
-
> The XML file does not provide full information about the type and members (for example, it does not contain any type information). To get full information about a type or member, the documentation file must be used together with reflection on the actual type or member.
126
+
> The XML file does not provide full information about the type and members (for example, it does not contain any type information). To get full information about a type or member, use the documentation file together with reflection on the actual type or member.
Copy file name to clipboardExpand all lines: docs/csharp/programming-guide/xmldoc/include.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,13 @@ The ID for the tag that precedes the comments. Enclose the ID in double quotatio
37
37
38
38
## Remarks
39
39
40
-
The \<include> tag lets you refer to comments in another file that describe the types and members in your source code. This is an alternative to placing documentation comments directly in your source code file. By putting the documentation in a separate file, you can apply source control to the documentation separately from the source code. One person can have the source code file checked out and someone else can have the documentation file checked out.
40
+
The `<include>` tag lets you refer to comments in another file that describe the types and members in your source code. This is an alternative to placing documentation comments directly in your source code file. By putting the documentation in a separate file, you can apply source control to the documentation separately from the source code. One person can have the source code file checked out and someone else can have the documentation file checked out.
41
41
42
-
The \<include> tag uses the XML XPath syntax. Refer to XPath documentation for ways to customize your \<include> use.
42
+
The `<include>` tag uses the XML XPath syntax. Refer to XPath documentation for ways to customize your `<include>` use.
43
43
44
44
## Example
45
45
46
-
This is a multifile example. The following is the first file, which uses \<include>.
46
+
This is a multifile example. The following is the first file, which uses `<include>`.
@@ -69,7 +69,7 @@ The summary for this other type.
69
69
70
70
## Program output
71
71
72
-
The following output is generated when you compile the Test and Test2 classes with the following command line: `-doc:DocFileName.xml.` In Visual Studio, you specify the XML doc comments option in the Build pane of the Project Designer. When the C# compiler sees the \<include> tag, it will search for documentation comments in xml_include_tag.doc instead of the current source file. The compiler then generates DocFileName.xml, and this is the file that is consumed by documentation tools such as [DocFX](https://dotnet.github.io/docfx/) and [Sandcastle](https://github.com/EWSoftware/SHFB) to produce the final documentation.
72
+
The following output is generated when you compile the Test and Test2 classes with the following command line: `-doc:DocFileName.xml.` In Visual Studio, you specify the XML doc comments option in the Build pane of the Project Designer. When the C# compiler sees the `<include>` tag, it searches for documentation comments in *xml_include_tag.doc* instead of the current source file. The compiler then generates *DocFileName.xml*, and this is the file that is consumed by documentation tools such as [DocFX](https://dotnet.github.io/docfx/) and [Sandcastle](https://github.com/EWSoftware/SHFB) to produce the final documentation.
The \<listheader> block is used to define the heading row of either a table or definition list. When defining a table, you only need to supply an entry for term in the heading.
45
+
The `<listheader>` block is used to define the heading row of either a table or definition list. When defining a table, you only need to supply an entry for term in the heading.
46
46
47
-
Each item in the list is specified with an \<item> block. When creating a definition list, you will need to specify both `term` and `description`. However, for a table, bulleted list, or numbered list, you only need to supply an entry for `description`.
47
+
Each item in the list is specified with an `<item>` block. When creating a definition list, you will need to specify both `term` and `description`. However, for a table, bulleted list, or numbered list, you only need to supply an entry for `description`.
48
48
49
-
A list or table can have as many \<item> blocks as needed.
49
+
A list or table can have as many `<item>` blocks as needed.
50
50
51
51
Compile with [-doc](../../language-reference/compiler-options/doc-compiler-option.md) to process documentation comments to a file.
The \<para> tag is for use inside a tag, such as [\<summary>](./summary.md), [\<remarks>](./remarks.md), or [\<returns>](./returns.md), and lets you add structure to the text.
28
+
The `<para>` tag is for use inside a tag, such as [\<summary>](./summary.md), [\<remarks>](./remarks.md), or [\<returns>](./returns.md), and lets you add structure to the text.
29
29
30
30
Compile with [-doc](../../language-reference/compiler-options/doc-compiler-option.md) to process documentation comments to a file.
31
31
32
32
## Example
33
33
34
-
See [\<summary>](./summary.md) for an example of using \<para>.
34
+
See [\<summary>](./summary.md) for an example of using `<para>`.
The \<param> tag should be used in the comment for a method declaration to describe one of the parameters for the method. To document multiple parameters, use multiple \<param> tags.
32
+
The `<param>` tag should be used in the comment for a method declaration to describe one of the parameters for the method. To document multiple parameters, use multiple `<param>` tags.
33
33
34
-
The text for the \<param> tag will be displayed in IntelliSense, the Object Browser, and in the Code Comment Web Report.
34
+
The text for the `<param>` tag is displayed in IntelliSense, the Object Browser, and the Code Comment Web Report.
35
35
36
36
Compile with [-doc](../../language-reference/compiler-options/doc-compiler-option.md) to process documentation comments to a file.
0 commit comments