I have the following class:
public class GraphingResults : IList<GraphingResult>
{
public List<GraphingResult> ToolkitResultList { get; set; }
public GraphingResults()
{
this.ToolkitResultList = new List<GraphingResult>();
}
// bunch of other stuff
}
As this class implements IList<GraphingResult>, it requires that I implement the following property (among many others!)
public int Count
{
get { throw new NotImplementedException(); }
}
I’m not sure exactly what to do… do I need to return the count of this.ToolkitResultList?
To throw a question back at you, why are you exposing a List publicly, as well as implemented IList?
The answer is that you should be doing one or the other. ie, Either expose the list publicly as you are doing, and dont implement IList, or dont expose the List, and insteads make your class the interface to that list: