Im new on C# and now im studying enums and im having this problem on property PTx.
error ” 1 Inconsistent accessibility: property type ‘EE5.Taxas’ is less accessible than property ‘EE5.Deposito.PTx’ 33 “
what should i do?
namespace EE5
{
enum Taxas
{ 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;
}
}
Make your Taxas enum public.