Skip to content

Conversation

@aditimantri2196
Copy link
Contributor

Summary

-The brief provided for "private protected" should be the brief for "protected internal".
-Removed "private protected" from the category.

Fixes #6206

-The brief provided for "private protected" should be the brief for "protected internal" instead. 
-As per my knowledge in c#, "private protected" access modifier does not exist. If it does what does this exactly do?
* `private`
- Access limited to this class
* `private protected`
- Access limited to the containing class or classes derived from the containing type within the same assembly
Copy link
Contributor

@ddizh ddizh Jun 29, 2018

Choose a reason for hiding this comment

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

Why? private protected access modifier does exist, it was invented in C# 7.2
See this doc for the reference.
The only change I would do here is add such reference for each access modifier directly in this Accessibility section.

Copy link
Member

Choose a reason for hiding this comment

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

This would be "nice to have", but I'll merge the PR if the text in the protected internal is fixed.

Copy link
Contributor Author

@aditimantri2196 aditimantri2196 Jun 30, 2018

Choose a reason for hiding this comment

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

@d-dizhevsky Thanks for my knowledge update. It helped.
@Bill Wagner Added private protected back in latest commit, with its original brief.

- Access limited to the current assembly (.exe, .dll, etc.)
* `protected internal`
- Access limited to the containing class or classes derived from the containing class
- Access limited to the containing class or classes derived from the containing type within the same assembly
Copy link
Contributor

Choose a reason for hiding this comment

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

Both the old version and the new version are wrong.

What it should say is that protected internal means that access is limited to:

  • the containing class
  • classes derived from the containing class
  • types within the same assembly

Copy link
Member

@BillWagner BillWagner Jun 29, 2018

Choose a reason for hiding this comment

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

The analysis by @svick above is correct. I would write this as: "Access limited to the containing class, classes derived from the containing class, or classes within the same assembly."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BillWagner Updated as per your review comment. You can see the required change in latest commit.

@BillWagner BillWagner added the ✨ 1st-time docs contributor! Indicates PRs from new contributors to the docs repository label Jun 29, 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 creating this and fixing it @aditimantri2196

We apprecia6te it. There's one change I"d like you to make before I :shipit:. If you updated line 61, and sync that branch, the PR will be updated. I'll approve the changes and :shipit:.

Just @ - mention me if you have any questions. Thanks again.

- Access limited to the current assembly (.exe, .dll, etc.)
* `protected internal`
- Access limited to the containing class or classes derived from the containing class
- Access limited to the containing class or classes derived from the containing type within the same assembly
Copy link
Member

@BillWagner BillWagner Jun 29, 2018

Choose a reason for hiding this comment

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

The analysis by @svick above is correct. I would write this as: "Access limited to the containing class, classes derived from the containing class, or classes within the same assembly."

* `private`
- Access limited to this class
* `private protected`
- Access limited to the containing class or classes derived from the containing type within the same assembly
Copy link
Member

Choose a reason for hiding this comment

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

This would be "nice to have", but I'll merge the PR if the text in the protected internal is fixed.

-Updated brief for protected internal as per the review comment
-Added private protected back with some modification as per the reference doc.
Added back the private protected with its original brief.
@aditimantri2196
Copy link
Contributor Author

@BillWagner Made the requested change.

Updated the number of categories of accessiblility from five to six.
@BillWagner
Copy link
Member

Thanks for making the updates @aditimantri2196 I've reviewed the latest version, I'll :shipit: now.

You should see the changes on the live site in the next few days, on our regular publishing cycle.

Thanks again.

@BillWagner BillWagner merged commit 200ca06 into dotnet:master Jun 30, 2018
@aditimantri2196 aditimantri2196 deleted the patch-1 branch July 1, 2018 07:34
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.

4 participants