pclarke7
asked on
Sharing a Class between two executables
Hello,
I have an executable PROJ001.exe  which creates a global class called "RBSTrans" which allows all of the forms within this project to have access to the same instance of this class. PROJ001 now needs to call a number of new executables (ie PROJ002, PROJ002, PROJ003 etc...) . How can I make the instance of class RBSTrans available to these new projects (executables). An example would be great.
regards
Pat
I have an executable PROJ001.exe  which creates a global class called "RBSTrans" which allows all of the forms within this project to have access to the same instance of this class. PROJ001 now needs to call a number of new executables (ie PROJ002, PROJ002, PROJ003 etc...) . How can I make the instance of class RBSTrans available to these new projects (executables). An example would be great.
regards
Pat
I'm not sure I understand your environment, but if PROJ001.exe is a .NET executable, then you can add a reference to that assembly in each of your other applications. As long as the relevant classes are declared public, then you can create instances of this class in those other applications.
ASKER
Thanks for that,
how do I add a reference to PROJ001.exe in PROJ002 and if PROJ001.exe already has an instance of my public Class , can PROJ002 reference the same instance ?
regards
Pat
how do I add a reference to PROJ001.exe in PROJ002 and if PROJ001.exe already has an instance of my public Class , can PROJ002 reference the same instance ?
regards
Pat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help Kaufmed, based on this answer I will swap over to DLL
regards
Pat
regards
Pat