Communication between C# applications - the easy way

Miklós picture Miklós · Jan 17, 2010 · Viewed 18.4k times · Source

I have two C# programs and I want to send some data back and forth between them. (And check if the data arrived to the other application.) The two programs will always run on the same computer, so no networking capability is required. I've already read some questions with similar topics here, but I'm not entirely sure which is the right method for me. (WCF, Remoting, etc.)

What I want to know, is which one is the easier to implement for a beginner in C#? (I don't want it to get too complicated anyway, it's only a few integers and some text that I want to send.)

If there isn't a real difference in difficulty, what advantages does one have over the other?

I'd really appreciate some simple example code as well.

Thanks in advance.

Answer

Giorgi picture Giorgi · Jan 17, 2010

You can use Pipes to send data between different instances of your application. If you just need to tell the other instance that something has happened you can send messages from one application to another by using SendMessage api.