ArrayList and Indexer - Help

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();
 
G

Guest

John,
I posted this problem twice by mistake. Would you please see my answers
from the other postings. I don't know how to answer your question at the
moment. I'm all confused by indexer and arraylist.
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top