Hi,
Use the Singleton design pattern for the class. In essence, you keep the
sole instance of the class in a private static variable of the class, you
make the class constructor private, and you have a public static property
called Instance returning the sole instance. The code of the Instance
property checks whether the instance has been created, and if not, creates
it and returns the reference to the instance to the caller.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"gaetanog" <ga******@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Hi there..
I have a question about instance usage...
I created a VStudio 2003 solution within 3 projects as follow:
1) Proj One: Main form
2) Proj Two: User Control
3) Proj Three: Class
I need to instance the class in project three ad use the same instance in
the user
control. i.e. I need to set a property of class in project three and use
it in the
User Control
Any ideas??
I hope to be quite clear...
Thanks in advance