我想问问哪里错了提示:1>c:\users\rjxy\documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs(22,12,22,16): error CS0051: 可访问性不一致: 参数类型“Gender”比方法“student.Port.Port(string, int, int, Gender)”的可访问性低
using System;
namespace student
{
public class Port
{
private string name;
public int age;
public int height;
private Gender sex = Gender.男;
public string Name
{
get{return this.name;}
set{this.name=value;}
}
public Port(string n,int h,int a,Gender Sex)
{
name=n;
height=h;
age=a;
sex=Sex;
}
static void Main()
{
Port p1=new Port("lisa",3,24,Gender.女);
Console.WriteLine("我的名字叫"+p1.name+"今年"+p1.age+"岁了,"+"身高"+p1.height+"cm!"+p1.sex);
}
}
}