我是C#的新手,现在我在学习枚举,我在属性PTx上遇到了这个问题。
错误“1可访问性不一致:属性类型'EE5.Taxas‘比属性'EE5.Deposito.PTx’更难访问33”
我该怎么办?
命名空间EE5 {枚举出租车{A= 20,B= 24,C= 30 }
enum Limites
{L1 = 2, L2 = 5 }
public class Deposito
{
private double Capital;
private int Time;
private Taxas Tx;
public Deposito(int C, double N)
{
Capital = C;
Time = N;
if (N < (int)Limites.L1)
Tx = Taxas.A;
else
if (N < (int)Limites.L2)
Tx = Taxas.B;
else
Tx = Taxas.C;
}
public Taxas PTx
{
get
{
return Tx;
}
}发布于 2012-04-19 01:03:53
公开你的Taxas枚举。
namespace EE5 { public enum Taxas { A = 20, B = 24, C = 30 }https://stackoverflow.com/questions/10214224
复制相似问题