It seems to me that you should be using a classlib project with the sharable class in it. That why, the other two projects can set project reference to the classlib project that will result in the two projects that have reference to the classlib project being able to instance the shared code object separately.
Sharing classes between projects and catching events
I've two projects in the same solution. The first one has a class that fires events on calling some functions. The second project use the same class and i add it as link to the first project so i can do any changes to the class without copying the code on the other project.
In this scenario i've create two object as instance of that class, one in a project and another in the second project. Now, in the first project, if I call a function of that class that fires an event, this event is cached also in the second project... It's very strange.... If I make a call to the object in the first project the same event is cached also in the second project.
How can I prevent this behaviour? I need to link that class for better management of the code but i'd want to have separate object in the two projects.
Thanks in advance
Guido S.
1 additional answer
Sort by: Most helpful
-
Guido Esse 21 Reputation points
2021-01-30T07:42:56.533+00:00 Thanks for replay...I'll try it but this behaviour is very strange!