gpt4 book ai didi

roslyn - C# 代码分析 ProtectedAndInternal 与 ProtectedOrInternal

转载 作者:行者123 更新时间:2023-12-04 13:12:50 33 4
gpt4 key购买 nike

我不清楚 AccessibilityProtectedAndInternalProtectedOrInternal 之间的区别。

我找到了一份说明 ProtectedOrInternal 映射到源代码构造 protected internal 的引用。

但是——假设这是正确的——某些东西在内部都受到保护意味着什么?

最佳答案

ProtectedOrInternal对应protected internal :

The protected internal keyword combination is a member access modifier. A protected internal member is accessible from the current assembly or from types that are derived from the containing class. For a comparison of protected internal with the other access modifiers, see Accessibility Levels.

ProtectedAndInternal对应private protected :

The private protected keyword combination is a member access modifier. A private protected member is accessible by types derived from the containing class, but only within its containing assembly. For a comparison of private protected with the other access modifiers, see Accessibility Levels.

关于roslyn - C# 代码分析 ProtectedAndInternal 与 ProtectedOrInternal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63258065/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com