Yes, it would work (provided you fix the compilation problems - "objedt" becomes "object", "DoWork" should use the results from "A".)
It's a messy solution though. Try not to use statics if you possibly can.
"Than you.
My intension is to use the Queue system, shoveling data between 2 Projects in the same solution. In Project 1. The receiver side there are 2 classes depenging on this Queue. In Project 2, the giver side, one class puting data in Queue.
Do you have a better solution to the problem, Please, Im all ears off course.
I want to solve this problem with one instance, serving all projects and classes.
Best to you.
"
Oooh! No - it won't work!
If you have two projects, then you have two processes - even if they are in the same solution. Each process has it's own memory space - they do not share. So even if you have a static variable in a class, if you have two processes they do not share the same static variable.
To put it another way: If you put data on the static queue in a process, you must remove it in the same process (even if it is on a different thread). You cannot remove it from a different processes static queue.
Instead, look at Inter-process communciations - sockets may be a little heavy handed here but they may be the easiest way to do it!
See
Here[
^] for a quick tutorial.