小编DLA*_*DLA的帖子

私有与公共变量

namespace hi
{
    class hithere
    {
         public int numberOne = 12;
         public int numberTwo = 12;

         static void yo()
         {
             public int numberThree = 12;
             private int numberFour = 12;
         }
    }
}
Run Code Online (Sandbox Code Playgroud)

有人能告诉我这段代码中的变量numberOne,numberTwo,numberThree和numberFour之间的区别吗?

c# variables private public

0
推荐指数
1
解决办法
1964
查看次数

标签 统计

c# ×1

private ×1

public ×1

variables ×1