I have a list, m_deskList, that's created on one form and I need to also use it in another. I've tried using FormName fn = new FormName(0, 0) but this doesn't work either. Is it possible to access the List (Which is declared as public on another form) from within my main form?
My List is declared in the other class, and initialised further down.
Code:
m_deskList.Add(new Desk(Convert.ToInt32(xPos), Convert.ToInt32(yPos), Convert.ToInt32(nWidth), Convert.ToInt32(nHeight)));
Code:
private List<Desk> m_deskList = new List<Desk>();
Comment