I have an interface, IFindable
that is implemented by a few classes. One other World
class holds a List<IFindable> items;
I have set up a getItems method in my World
class, to return the list of IFindables. Now, I am trying to access that list from my Default.aspx.cs
class (this is a web project). Unfortunately, I don't seem to be able to since this class doesn't understand what IFindable is. I get the following error:
Inconsistent accessibility: return type
'System.Collections.Generic.List<IFindable>' is less accessible than
method 'World.getItems()'
Why is this? Have I gone about this wrong?