What does the “private” modifier do?

前端 未结 13 979
予麋鹿
予麋鹿 2021-01-17 07:24

Considering \"private\" is the default access modifier for class Members, why is the keyword even needed?

13条回答
  •  情话喂你
    2021-01-17 07:57

    Actually, if the class or struct is not declared with an access modifier it defaults to internal.

    So if you want to make it private, use private.

提交回复
热议问题