What is the meaning of the planned “private protected” C# access modifier?

前端 未结 6 1382
名媛妹妹
名媛妹妹 2020-12-02 05:49

As part of the Roslyn documentation on GitHub, there\'s a page called Language feature implementation status, with planned language features for C# and VB.

One featu

6条回答
  •  离开以前
    2020-12-02 06:28

    According to "Professional C# 2008" by De Bill Evjen and Jay Glynn, page 1699:

    private protected - "only derived types within the current assembly"

    C++/CLI has a similar feature - Define and Consume Classes and Structs (C++/CLI) > Member visibility:

    private protected -or- protected private - Member is protected inside the assembly but private outside the assembly.

提交回复
热议问题