method without access modifier

前端 未结 8 966
走了就别回头了
走了就别回头了 2020-12-05 22:21

Ok this is bugging me.. I know I\'ve read it somewhere and google isn\'t helping.

What is the accessibility level of a method that does not specify an access modifie

8条回答
  •  不思量自难忘°
    2020-12-05 23:16

    The default accessibility for a type is internal, but the default accesibility of that type's members depends on the type.

    Generally speaking, members of a class are private by default, where as members of a struct are public by default. This varies by language; default struct access modifiers for C++ are public, where as for C#, they are private.

提交回复
热议问题