Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Private ProtectedVB.NET 15.5 では、クラス メンバーに追加のアクセス レベルが導入されました。
Private Protected
例を以下に示します。
Private Protected internalValue As Integer
私の理解では、これは just と同等である必要がProtectedあります。つまり、同じクラスとその子でアクセスできますが、外部ではアクセスできません。
Protected
では、これが役立つのはいつで、Protectedメンバーとの違いは何ですか?
Private Protected 修飾子は、クラス メンバーを派生型からアクセスできるようにしますが、それを含む assembly 内でのみ可能です。
がないとPrivate、Protected別のアセンブリの派生クラスからもメンバーにアクセスできます。
Private