Trying to derive a class from KeyedCollection, I keep getting the following error:
Inconsistent accessibility: base class 'System.Collections.ObjectModel.KeyedCollection<string,Dell.Global.PartsClass.DBObjects.InvThreshold>' is less accessible than class 'Dell.Global.PartsClass.DBObjects.InvThresholdList'
Here's the code, it's pretty much straight from the sample in the KeyedCollection documentation:
public class InvThresholdList : KeyedCollection<string, InvThreshold>
Is InvThreshold an internal class by any chance, rather than public? That would certainly explain the compiler error. Fix it by either making InvThresholdList internal or by making InvThreshold public.
Tuesday, January 24, 2006 6:44 PM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.