From baf8b662db10c8d1b1560a037ae36b94f6b20d65 Mon Sep 17 00:00:00 2001 From: OHSAWA Masashi Date: Mon, 9 Jan 2023 00:26:50 +0900 Subject: [PATCH 1/3] changed description of `IsNot` original: "Use the `IsNot` keyword instead of `Not ... Is Nothing`." proposal-1: "Use `... IsNot Nothing` instead of `Not ... Is Nothing`." proposal-2: "Use `x IsNot y` instead of `Not x Is y`." --- .../program-structure/coding-conventions.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/visual-basic/programming-guide/program-structure/coding-conventions.md b/docs/visual-basic/programming-guide/program-structure/coding-conventions.md index a4aba86422ea8..9d25512bffb65 100644 --- a/docs/visual-basic/programming-guide/program-structure/coding-conventions.md +++ b/docs/visual-basic/programming-guide/program-structure/coding-conventions.md @@ -34,9 +34,9 @@ Microsoft develops samples and documentation that follow the guidelines in this - Use **Pretty listing (reformatting) of code** to reformat your code in the code editor. For more information, see [Options, Text Editor, Basic (Visual Basic)](/visualstudio/ide/reference/options-text-editor-basic-visual-basic). -- Use only one statement per line. Don't use the Visual Basic line separator character (:). +- Use only one statement per line. Don't use the Visual Basic line separator character (`:`). -- Avoid using the explicit line continuation character "_" in favor of implicit line continuation wherever the language allows it. +- Avoid using the explicit line continuation character "` _`" in favor of implicit line continuation wherever the language allows it. - Use only one declaration per line. @@ -55,7 +55,7 @@ Microsoft develops samples and documentation that follow the guidelines in this - Start comment text with an uppercase letter, and end comment text with a period. -- Insert one space between the comment delimiter (') and the comment text. +- Insert one space between the comment delimiter (`'`) and the comment text. [!code-vb[VbVbalrGuidelines#2](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrGuidelines/VB/Class1.vb#2)] @@ -83,7 +83,7 @@ Microsoft develops samples and documentation that follow the guidelines in this ### Relaxed Delegates in Event Handlers - Do not explicitly qualify the arguments (Object and EventArgs) to event handlers. If you are not using the event arguments that are passed to an event (for example, sender as Object, e as EventArgs), use relaxed delegates, and leave out the event arguments in your code: + Do not explicitly qualify the arguments (`Object` and `EventArgs`) to event handlers. If you are not using the event arguments that are passed to an event (for example, `sender As Object, e As EventArgs`), use relaxed delegates, and leave out the event arguments in your code: [!code-vb[VbVbalrGuidelines#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrGuidelines/VB/Class1.vb#7)] @@ -129,7 +129,7 @@ Microsoft develops samples and documentation that follow the guidelines in this ### Use the IsNot Keyword - Use the `IsNot` keyword instead of `Not...Is Nothing`. + Use `... IsNot Nothing` instead of `Not ... Is Nothing`. ### New Keyword From 1a78a34390c14468c656b90b9b8eda243918181b Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Mon, 9 Jan 2023 09:41:02 -0500 Subject: [PATCH 2/3] Update docs/visual-basic/programming-guide/program-structure/coding-conventions.md --- .../programming-guide/program-structure/coding-conventions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/programming-guide/program-structure/coding-conventions.md b/docs/visual-basic/programming-guide/program-structure/coding-conventions.md index 9d25512bffb65..8cf6bc0ae2c56 100644 --- a/docs/visual-basic/programming-guide/program-structure/coding-conventions.md +++ b/docs/visual-basic/programming-guide/program-structure/coding-conventions.md @@ -83,7 +83,7 @@ Microsoft develops samples and documentation that follow the guidelines in this ### Relaxed Delegates in Event Handlers - Do not explicitly qualify the arguments (`Object` and `EventArgs`) to event handlers. If you are not using the event arguments that are passed to an event (for example, `sender As Object, e As EventArgs`), use relaxed delegates, and leave out the event arguments in your code: + Do not explicitly qualify the arguments (`Object` and `EventArgs`) to event handlers. If you are not using the event arguments that are passed to an event (for example, `sender As Object`, `e As EventArgs`), use relaxed delegates, and leave out the event arguments in your code: [!code-vb[VbVbalrGuidelines#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrGuidelines/VB/Class1.vb#7)] From c3e8b31f833a60a552f1ba0abd3a4e9a61db611c Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Mon, 9 Jan 2023 09:43:02 -0500 Subject: [PATCH 3/3] Apply suggestions from code review --- .../programming-guide/program-structure/coding-conventions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/visual-basic/programming-guide/program-structure/coding-conventions.md b/docs/visual-basic/programming-guide/program-structure/coding-conventions.md index 8cf6bc0ae2c56..40e0ffd0c848d 100644 --- a/docs/visual-basic/programming-guide/program-structure/coding-conventions.md +++ b/docs/visual-basic/programming-guide/program-structure/coding-conventions.md @@ -36,7 +36,7 @@ Microsoft develops samples and documentation that follow the guidelines in this - Use only one statement per line. Don't use the Visual Basic line separator character (`:`). -- Avoid using the explicit line continuation character "` _`" in favor of implicit line continuation wherever the language allows it. +- Avoid using the explicit line continuation character "`_`" in favor of implicit line continuation wherever the language allows it. - Use only one declaration per line.