-
Notifications
You must be signed in to change notification settings - Fork 6k
C# reference: Consolidate the selection statements articles #25520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C# reference: Consolidate the selection statements articles #25520
Conversation
@@ -46,25 +46,3 @@ public class MyClass | |||
} | |||
} | |||
``` | |||
|
|||
## Example of void method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example doesn't fit the article anymore as it generates CS8119 error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pkulikov This is really good as well.
I have a few small nits to address, and then this is ready to
Commenting so it stays in my queue to review
--- | ||
# Selection statements (C# reference) | ||
|
||
The following statements select statements to execute out of a number of possible statements based on the value of an expression: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo, I think:
Updated suggestion based on the conversation here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BillWagner no, not a typo. The switch
statement executes several statements (all those in one section). if
statement always selects one, because technically the whole block {...}
is considered as one embedded statement.
Should it be:
...select statements to execute FROM a number of possible statements...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. I like your change here.
docs/csharp/language-reference/statements/selection-statements.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/statements/selection-statements.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/statements/selection-statements.md
Outdated
Show resolved
Hide resolved
docs/csharp/language-reference/statements/selection-statements.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
@BillWagner thank you for the review. I've applied all your suggestions except the first one. Please check my latest commit, in which I've made more changes based on your feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting all this together @pkulikov
I'll now.
Contributes to #10746 (I think it would be better to have two separate articles for selection and jump statements)