I have a list within a user control that I've made, and I want to be able to access it from a class that instantiates the user control, but I'm getting a strange error.
User Control:
Note that Downloads is just a public collection class that I made.Code:public partial class ctlMain : UserControl { private Downloads _downloads; public Downloads DownloadList { get { return _downloads; } } ...
Instantiating Class:
The error I'm getting is:Code:ctlMain _ctl = new ctlMain(); foreach (DownloadItem di in _ctl.DownloadList) { }
"Error 1 'System.Windows.Forms.UserControl' does not contain a definition for 'DownloadList'"
It should also be noted that this was done in c# 2005.




Reply With Quote