Skip to content

Conversation

@IanKemp
Copy link
Contributor

@IanKemp IanKemp commented Jun 8, 2018

also fix typo (exp => expr)

also fix typo (exp => expr)
@IanKemp IanKemp requested a review from BillWagner as a code owner June 8, 2018 07:56
@BillWagner BillWagner added the ✨ 1st-time docs contributor! Indicates PRs from new contributors to the docs repository label Jun 8, 2018
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this clarifying remark @IanKemp IT was not clear that the expression cannot be null for the is expression to be true. I did have a suggestion for a different location for the remark. Can you make that change, and then I'll :shipit:.

Thanks for helping us improve docs.

- *expr* is an instance of a type that implements the *type* interface.

If *exp* is `true` and `is` is used with an `if` statement, *varname* is assigned and has local scope within the `if` statement only.
- *expr* does not evaluate to `null`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll suggest moving this to Line 72, above. Then, Line 72 would read

The is expression is true if expr does not evaluate to null, and any of the following is true:

(By putting "expr does not evaluate to null" as one of the conditions in the list, any non-null object would mean is evaluates to true)

The condition "expr is not null" should not be part of the "any of the following" condition.
@BillWagner BillWagner merged commit 0abfeb0 into dotnet:master Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ 1st-time docs contributor! Indicates PRs from new contributors to the docs repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants