c#用枚举类型时出现了访问不一致的问题怎么解决

来源:5-1 C# 值类型和引用类型

小鱼仙倌

2018-11-04 09:42

 public string name;
        public int age;
        private Gender sex;
        public Child(string name, int age, Gender sex)
        {
            this.name = name;
            this.age = age;
            this.sex = sex;        }


写回答 关注

1回答

  • qq_乾_4
    2018-11-08 11:41:11

    public string name;  

       public int age;       

       public Gender sex;      

       public Child(string name, int age, Gender sex)      

      {          

        this.name = name;          

        this.age = age;          

         this.sex = sex;      

      }

用C#实现封装

C#视频教程教大家,用C#语言实现面向对象的封装

77603 学习 · 182 问题

查看课程

相似问题