I have a class that inherits from CollectionBase
.
public NavigationMenuItemsCollection MenuItems { get; set; }
I have a method that is attempting to get the item from the index, but it's not working.
public void ActivatePage(int index)
{
NavigationMenuItem navigationMenuItem = (NavigationMenuItem)MenuItems[0];
}
CollectionBase inherits from IList
, ICollection
, and IEnumerable
. So I thought it could be indexed. Any ideas on what's going on?