gpt4 book ai didi

class - 默认情况下是一个类 public、private 或 internal

转载 作者:搜寻专家 更新时间:2023-11-01 05:59:26 27 4
gpt4 key购买 nike

当我声明一个类时:

class foo {
//code goes here
}

类是标准的publicprivate 还是internal?我对此感到疑惑,但找不到任何相关信息。

最佳答案

根据documentation :

All entities in your code (with a few specific exceptions, as described later in this chapter) have a default access level of internal if you do not specify an explicit access level yourself. As a result, in many cases you do not need to specify an explicit access level in your code

它是内部的。

关于class - 默认情况下是一个类 public、private 或 internal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26179920/

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