Richard Brennan

Richard Brennan

  • NA
  • 114
  • 85.4k

using class libraries

Apr 17 2011 2:49 PM
I have created a class library project and made a class and it has built and made the dll. 

I have added the reference to this dll to a different project and added the using directive.

I can use 'new' and instanciate a class from the dll.  I have even used an array of this class.  All is fine when I use the data on one form.

Here is the problem.  I am loading data from a file into the class in the dll - and i need it to be available from all forms in may app - how do i make it possible to see my instanciation of the class across different forms.  It is currently declared (using new) on the main form of the project.

I have tried instanciating the class in a static class but that is wrong. 

Answers (6)