c#用枚舉類型時(shí)出現(xiàn)了訪問不一致的問題怎么解決
?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;????????}
2018-11-08
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;??????
? }