本帖最后由 许大虾 于 2013-5-14 10:46 编辑
- enum Gender
- {
- 男,
- 女,
- }
- public struct Person //定义一个名称叫Person的结构
- {
- public string name;
- public Gender sex;
- public int age;
- }
- class Program
- {
- static void Main(string[] args)
- {
- Person onePerson;
- onePerson.name = "Xudaxia";
- onePerson.age = 22;
- onePerson.sex = Gender.男;
- Person secPerson;
- secPerson.name = "Xuxiaoxia";
- secPerson.age = 21;
- secPerson.sex = Gender.男;
- }
复制代码 出现这样的错误
求大神看看~ |