Skip to content

CLR 类修饰符

private

成员只能由同一个类(class)类型中的其他成员访问。

family

成员可由派生类型访问,不管那些类型是否在同一个程序集中。注意,许多语言(比如 C++ 和 C#)都用 protected 修饰符来标志 family

family and assembly

成员可由派生类型访问,但这些派生类型必须在同一个程序集中定义。许多语言(比如C#和Visual Basic)都没有提供这种访问控制。当然,IL 汇编语言不在此列。

2019/11/07 追记:C# 7.2 中增加了 private protected 修饰符来标志 family and assembly

assembly

成员可由同一个程序集中的任何代码访问。许多语言都用 internal 修饰符来标志 assembly

family or assembly

成员可由任何程序集中的派生类型访问。成员也可由同一个程序集中的任何类型访问。C#用 protected internal 修饰符标志 family or assembly.

public

成员可由任何程序集中的任何代码访问。

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.