I've got a list in a class that I'm trying to return to view on a form but I cant return it from the class, How would I do this?
On the class:
private List<Module> modules;
public void AddModule(Module add)
{
modules.Add(add);
}
public List Modules
{
get { return modules; }
}
On the form:
moduleTitleLabel.Text = cnet.Title;
stgOne.AddModule(cnet);
moduleList.DataSource = stgOne.Modules;
I get an error on the List on the return.