What is the easiest way for two separate C# .Net apps to talk to each other on the same computer -


I want my two applications to be able to send each other string and " do something on the basis of the string ".

This is an pre-proof-of-concept-mockup type type, so no safety precautions are necessary and you want to disable as much.

So how can I do my part with minimal work?

(You can work as my dear friend so hard as you do on the problem)

To what extent do actually, in fact need to be separate application?

Can you do two different projects that you start with a separate project, on different threads?

  Fixed zero main () (New thread (Project 1 program. Main). Start (); New thread (Project 2 program. Main). Start ();}  < / Pre> 

At that point you can use static variables (in the fourth project, both previously referred by both projects) to set up a shared communication channel between them, for example, you two (page down Can see half way), can be one for every direction (You want to use only the strings in the queue, or make the normal one, and for example use ProducerConsumer gt; . If you have .NET 4.0 beta You can use one.)

This will be very embarrassing - and isolation of different AppDomain Without even you can see some interesting effects in terms of the stable variable both "applications" but it effectively achieves what you get Trying to roam.

You should not take the idea of ​​this implementation near the anywhere production code - but for the condition that you describe it, it Sounds like "simple for implementation", is the most important point.

Just because the project hierarchy is not understood, here is a graphical representation

  launcher / \ / \ app 1 app2 \ / \ / \ / shared content  

(To make it even easier you can work collaborators use only one project, and its main method can be found in the same project The idea of ​​having two apps is to launch all the different threads. And from this point it is anyway. On the other hand, by separating the projects, about the different apps it seems that can make it easier.)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -