PC Review


Reply
Thread Tools Rate Thread

ArrayList and Indexer - Help

 
 
=?Utf-8?B?U3RlcGg=?=
Guest
Posts: n/a
 
      7th Feb 2005
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();

 
Reply With Quote
 
 
 
 
John Sun
Guest
Posts: n/a
 
      7th Feb 2005
How do you declare CReg, did you delcare it public or Internal?

Jianwei

 
Reply With Quote
 
=?Utf-8?B?U3RlcGg=?=
Guest
Posts: n/a
 
      7th Feb 2005
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!

"John Sun" wrote:

> How do you declare CReg, did you delcare it public or Internal?
>
> Jianwei
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread-safety: Change property of items in arraylist versus removingitems from the arraylist Curious Microsoft Dot NET 2 6th Aug 2008 12:36 PM
<?>Indexer Rises from the Disabled or "Night of the Locking Indexer"<?> citizenkahn Windows XP Help 0 26th Jun 2006 04:47 AM
ArrayList(ICollection) constructor & overriden ArrayList.AddRange(). Sylvain Microsoft C# .NET 1 4th Jun 2005 01:19 AM
ArrayList and Indexer - Help! =?Utf-8?B?U3RlcGg=?= Microsoft C# .NET 7 7th Feb 2005 10:15 PM
Inherited ArrayList doesn't show members on indexer. Iulian Ionescu Microsoft C# .NET 1 8th Sep 2003 03:14 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:41 PM.