访问修饰符

类内部

子类

程序集内

程序集外

Default

 

 

 

Public

Private

 

 

 

Protected

 

 

Internal

 

Protected Internal

 

 

 

Internal与Protected Internal的区别:

在有子类的情况下,如果父类和子类不在同一个程序集内,Protected Internal可以访问父类的成员,而Internal不可以访问父类的成员.(成员包括成员变量和成员方法)

相关文章:

  • 2021-12-07
  • 2021-10-27
  • 2022-12-23
  • 2021-11-29
  • 2022-03-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-07-04
相关资源
相似解决方案