G
Guest
I'm learning C#. I have the code below that's giving me this error when I
try to compile it: "Inconsistent accessibility: indexer return type
'...CReg' is less accessible than indexer '...Whouse.this[int]'". Would
someone please tell me why?
Thanks for your help.
public class WarehouseStore : IEnumerable
{
..
public CReg this[ int index ]
{
get
{
return(myRegs[ this ]);
}
}
ArrayList myRegs = new ArrayList();
try to compile it: "Inconsistent accessibility: indexer return type
'...CReg' is less accessible than indexer '...Whouse.this[int]'". Would
someone please tell me why?
Thanks for your help.
public class WarehouseStore : IEnumerable
{
..
public CReg this[ int index ]
{
get
{
return(myRegs[ this ]);
}
}
ArrayList myRegs = new ArrayList();